diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 6e05e1655..445006b32 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -177,7 +177,7 @@ int main (int argc, char * * argv) Activity act(*logger, lvlTalkative, actUnknown, fmt("connecting to '%s'", bestMachine->storeUri)); Store::Params storeParams; - if (hasPrefix(storeUri, "ssh://")) { + if (hasPrefix(bestMachine->storeUri, "ssh://")) { storeParams["max-connections"] ="1"; storeParams["log-fd"] = "4"; if (bestMachine->sshKey != "") diff --git a/tests/remote-builds.nix b/tests/remote-builds.nix index 39bd090e4..58a26d8b6 100644 --- a/tests/remote-builds.nix +++ b/tests/remote-builds.nix @@ -85,7 +85,10 @@ in } # Perform a build and check that it was performed on the slave. - my $out = $client->succeed("nix-build ${expr nodes.client.config 1}"); + my $out = $client->succeed( + "nix-build ${expr nodes.client.config 1} 2> build-output", + "grep -q Hello build-output" + ); $slave1->succeed("test -e $out"); # And a parallel build.