1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 21:51:50 +02:00

Add a test for the non-blocking GC

This commit is contained in:
Eelco Dolstra 2021-10-15 16:52:37 +02:00
parent ac54c6faa6
commit 10f9a8e77d
3 changed files with 38 additions and 0 deletions

View file

@ -735,6 +735,10 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
}
};
/* Synchronisation point for testing, see tests/gc-concurrent.sh. */
if (auto p = getEnv("_NIX_TEST_GC_SYNC"))
readFile(*p);
/* Either delete all garbage paths, or just the specified
paths (for gcDeleteSpecific). */
if (options.action == GCOptions::gcDeleteSpecific) {