mirror of
https://github.com/NixOS/nix.git
synced 2025-12-08 18:11:02 +01:00
Improve regression testing for uncachable source paths
These now throw an error by default in the test suite.
This commit is contained in:
parent
a175c67def
commit
3a4e6cadeb
7 changed files with 19 additions and 12 deletions
|
|
@ -55,9 +55,13 @@ std::pair<StorePath, Hash> fetchToStore2(
|
|||
}
|
||||
debug("source path '%s' not in store", path);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
static auto barf = getEnv("_NIX_TEST_BARF_ON_UNCACHEABLE").value_or("") == "1";
|
||||
if (barf)
|
||||
throw Error("source path '%s' is uncacheable (filter=%d)", path, (bool) filter);
|
||||
// FIXME: could still provide in-memory caching keyed on `SourcePath`.
|
||||
debug("source path '%s' is uncacheable (%d, %d)", path, (bool) filter, (bool) fingerprint);
|
||||
debug("source path '%s' is uncacheable", path);
|
||||
}
|
||||
|
||||
Activity act(*logger, lvlChatty, actUnknown,
|
||||
fmt(mode == FetchMode::DryRun ? "hashing '%s'" : "copying '%s' to the store", path));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue