diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-10-15 16:52:37 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-10-15 16:52:37 +0200 |
commit | 10f9a8e77d504354deafbcf7351a6d46d4528542 (patch) | |
tree | 27989dea7b8e87e31a32b3f1bae161176f39b06f /src/libstore | |
parent | ac54c6faa6b73c3da180dec666fadd6e8d7d18e3 (diff) |
Add a test for the non-blocking GC
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/gc.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 648295684..5e8cbf8fc 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -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) { |