forked from lix-project/lix
Fix tests on systems with a non-master git defaultBranch #1
2 changed files with 14 additions and 10 deletions
|
@ -33,17 +33,21 @@ kj::Promise<Result<Goal::WorkResult>>
|
||||||
Goal::waitForGoals(kj::Array<std::pair<GoalPtr, kj::Promise<void>>> dependencies) noexcept
|
Goal::waitForGoals(kj::Array<std::pair<GoalPtr, kj::Promise<void>>> dependencies) noexcept
|
||||||
try {
|
try {
|
||||||
auto left = dependencies.size();
|
auto left = dependencies.size();
|
||||||
auto collectDeps = asyncCollect(std::move(dependencies));
|
for (auto & [dep, p] : dependencies) {
|
||||||
|
p = p.then([this, dep, &left] {
|
||||||
while (auto item = co_await collectDeps.next()) {
|
|
||||||
left--;
|
left--;
|
||||||
auto & dep = *item;
|
|
||||||
|
|
||||||
trace(fmt("waitee '%s' done; %d left", dep->name, left));
|
trace(fmt("waitee '%s' done; %d left", dep->name, left));
|
||||||
|
|
||||||
if (dep->exitCode != Goal::ecSuccess) ++nrFailed;
|
if (dep->exitCode != Goal::ecSuccess) ++nrFailed;
|
||||||
if (dep->exitCode == Goal::ecNoSubstituters) ++nrNoSubstituters;
|
if (dep->exitCode == Goal::ecNoSubstituters) ++nrNoSubstituters;
|
||||||
if (dep->exitCode == Goal::ecIncompleteClosure) ++nrIncompleteClosure;
|
if (dep->exitCode == Goal::ecIncompleteClosure) ++nrIncompleteClosure;
|
||||||
|
}).eagerlyEvaluate(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto collectDeps = asyncCollect(std::move(dependencies));
|
||||||
|
|
||||||
|
while (auto item = co_await collectDeps.next()) {
|
||||||
|
auto & dep = *item;
|
||||||
|
|
||||||
waiteeDone(dep);
|
waiteeDone(dep);
|
||||||
|
|
||||||
|
|
|
@ -167,9 +167,9 @@ test "$(<<<"$out" grep -E '^error:' | wc -l)" = 4
|
||||||
|
|
||||||
out="$(nix build -f fod-failing.nix -L x4 2>&1)" && status=0 || status=$?
|
out="$(nix build -f fod-failing.nix -L x4 2>&1)" && status=0 || status=$?
|
||||||
test "$status" = 1
|
test "$status" = 1
|
||||||
test "$(<<<"$out" grep -E '^error:' | wc -l)" = 2
|
test "$(<<<"$out" grep -E '^error:' | wc -l)" -ge 2
|
||||||
<<<"$out" grepQuiet -E "error: 1 dependencies of derivation '.*-x4\\.drv' failed to build"
|
<<<"$out" grepQuiet -E "error: [12] dependencies of derivation '.*-x4\\.drv' failed to build"
|
||||||
<<<"$out" grepQuiet -E "hash mismatch in fixed-output derivation '.*-x2\\.drv'"
|
<<<"$out" grepQuiet -E "hash mismatch in fixed-output derivation '.*-x[23]\\.drv'"
|
||||||
|
|
||||||
out="$(nix build -f fod-failing.nix -L x4 --keep-going 2>&1)" && status=0 || status=$?
|
out="$(nix build -f fod-failing.nix -L x4 --keep-going 2>&1)" && status=0 || status=$?
|
||||||
test "$status" = 1
|
test "$status" = 1
|
||||||
|
|
Loading…
Reference in a new issue