nix build can potentially hang for a long time, even if the binary was previous built, e.g. because Nix daemon is busy with other stuff and its database is locked.
This could previous potentially cause the test to spend a large part of it's time trying to build binaries.
Instead, prebuild all binaries once before parallel is started, and store the resulting path into matching env variable. During tests just take the path out of variable.
nix build
can potentially hang for a long time, even if the binary was previous built, e.g. because Nix daemon is busy with other stuff and its database is locked.This could previous potentially cause the test to spend a large part of it's time trying to build binaries.
Instead, prebuild all binaries once before
parallel
is started, and store the resulting path into matching env variable. During tests just take the path out of variable.