mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +02:00
Add an option to make non-determinism non-fatal
That is, when build-repeat > 0, and the output of two rounds differ, then print a warning rather than fail the build. This is primarily to let Hydra check reproducibility of all packages.
This commit is contained in:
parent
ceeedb58d2
commit
8bdf83f936
2 changed files with 24 additions and 11 deletions
|
@ -208,7 +208,18 @@ struct BuildResult
|
|||
NotDeterministic,
|
||||
} status = MiscFailure;
|
||||
std::string errorMsg;
|
||||
|
||||
/* How many times this build was performed. */
|
||||
unsigned int timesBuilt = 0;
|
||||
|
||||
/* If timesBuilt > 1, whether some builds did not produce the same
|
||||
result. (Note that 'isNonDeterministic = false' does not mean
|
||||
the build is deterministic, just that we don't have evidence of
|
||||
non-determinism.) */
|
||||
bool isNonDeterministic = false;
|
||||
|
||||
//time_t startTime = 0, stopTime = 0;
|
||||
|
||||
bool success() {
|
||||
return status == Built || status == Substituted || status == AlreadyValid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue