test: Fix caching issues (#111) #117
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit deals with the problems of caching LilyPond versions between
Travis-CI builds reported in #111. Specifically, it turned out that
there is not a separate cache per build-matrix entry (since LilyPond is
not a supported language), but only a dedicated cache per branch.
The issue was then that only one version of LilyPond was actually used
to run the tests, since the installation path was identical for all
versions.
The solution introduced in this commit is to have an explicit cache
management mechanism:
Each LilyPond version is installed in its own folder under the
$HOME/.lilypondcache directory, for instanceEvery time a cached LilyPond version is used, the timestamp is
written to a file in the cache, for later retrieval
After all the tests have been run, the cache is cleaned: LilyPond
versions that have not been used for more than one day (this is
configurable) are removed from the cache. Note that since this
cleanup phase is run after the tests have been run, all the LilyPond
versions that have actually been used in the last test run are kept
in the cache