-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix testsuite in incremental file-watching mode (#4550)
This PR fixes a couple of tests so that running DUNE_WATCHING_MODE_INCREMENTAL=true dune runtest -w doesn't fall over on the very first build. There were two problematic tests: * [vcs_tests.ml] was using functions like [Vcs.describe] that call out to [git] or [hg]. Despite using [of_reproducible_fiber], the corresponding fibers are actually not reproducible, since the result depends on the current state of the file system. I fixed this by adding [Memo.Build.of_non_reproducible_fiber] that adds a dependency on the current run, and changed [Vcs] to use it instead. This means that we will rerun [Vcs]'s fibers in every build run. We might find a way to optimise this in future. * [memoize_tests.ml] was calling [Memo.reset] relying on it to clear the memoization caches, but [Memo.reset] doesn't do that in the incremental mode. I fixed this by adding [Memo.clear_memoization_caches] that clears the caches unconditionally and changed the test to call it instead. Signed-off-by: Andrey Mokhov <[email protected]>
- Loading branch information
1 parent
5030b42
commit 96d30f4
Showing
4 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters