Fix tests on systems with a non-master git defaultBranch #1

Open
zebreus wants to merge 140 commits from fix-tests-without-master into main
6 changed files with 7 additions and 10 deletions
Showing only changes of commit aa33c34c9b - Show all commits

View file

@ -1751,7 +1751,7 @@ DerivationGoal::continueOrError(kj::Promise<Outcome<void, Goal::Finished>> p)
{
return p.then([](auto r) -> Result<WorkResult> {
if (r.has_value()) {
return ContinueImmediately{};
return StillAlive{};
} else if (r.has_error()) {
return r.assume_error();
} else {

View file

@ -86,7 +86,7 @@ try {
});
state = &DrvOutputSubstitutionGoal::realisationFetched;
return pipe.promise.then([]() -> Result<WorkResult> { return ContinueImmediately{}; });
return pipe.promise.then([]() -> Result<WorkResult> { return StillAlive{}; });
} catch (...) {
return {std::current_exception()};
}

View file

@ -17,7 +17,7 @@ try {
/* If we are polling goals that are waiting for a lock, then wake
up after a few seconds at most. */
co_await worker.aio.provider->getTimer().afterDelay(settings.pollInterval.get() * kj::SECONDS);
co_return ContinueImmediately{};
co_return StillAlive{};
} catch (...) {
co_return std::current_exception();
}
@ -45,11 +45,11 @@ try {
waiteeDone(dep);
if (dep->exitCode == ecFailed && !settings.keepGoing) {
co_return result::success(ContinueImmediately{});
co_return result::success(StillAlive{});
}
}
co_return result::success(ContinueImmediately{});
co_return result::success(StillAlive{});
} catch (...) {
co_return result::failure(std::current_exception());
}

View file

@ -103,7 +103,6 @@ public:
struct Finished;
struct [[nodiscard]] StillAlive {};
struct [[nodiscard]] ContinueImmediately {};
struct [[nodiscard]] Finished {
ExitCode exitCode;
BuildResult result;
@ -116,7 +115,6 @@ public:
struct [[nodiscard]] WorkResult : std::variant<
StillAlive,
ContinueImmediately,
Finished>
{
WorkResult() = delete;

View file

@ -240,7 +240,7 @@ try {
});
state = &PathSubstitutionGoal::finished;
return pipe.promise.then([]() -> Result<WorkResult> { return ContinueImmediately{}; });
return pipe.promise.then([]() -> Result<WorkResult> { return StillAlive{}; });
} catch (...) {
return {std::current_exception()};
}

View file

@ -212,8 +212,7 @@ void Worker::handleWorkResult(GoalPtr goal, Goal::WorkResult how)
{
std::visit(
overloaded{
[&](Goal::StillAlive) {},
[&](Goal::ContinueImmediately) { wakeUp(goal); },
[&](Goal::StillAlive) { wakeUp(goal); },
[&](Goal::Finished & f) { goalFinished(goal, f); },
},
how