lix/tests
aszlig 6567ab95a0
build-remote: Fix missing log output
The storeUri variable in the build-remote hook is declared very much to
the start of the main function and a bunch of lines later, the same
variable gets checked via hasPrefix() but it gets assigned *after* that
check when the most suitable machine for the build was choosen.

So I guess this was just a typo in d16fd24973
and what we really want is to either checkd the prefix *after* assigning
storeUri or use bestMachine->storeUri directly.

I choose the latter, because the former could introduce even more
regressions if the try block where the variable gets assigned terminates
early.

Nevertheless, the reason why the log output didn't work is because
hasPrefix() checked for "ssh://" in front of storeUri, but if the
storeUri isn't set correctly (or at all), we don't get the log file
descriptor set up properly, leading to no log output.

I've adjusted the remote-builds test to include a regression test for
this, so that we can make sure we get a build output when using remote
builds.

In addition to that I've tested this with two of my build farms and the
build logs are emitted correctly again.

Signed-off-by: aszlig <aszlig@nix.build>
2017-11-25 01:34:18 +01:00
..
lang
add.sh
binary-cache.sh
build-hook.nix
build-remote.sh
case-hack.sh
case.nar
check-refs.nix
check-refs.sh
check-reqs.nix
check-reqs.sh
common.sh.in
config.nix
dependencies.builder0.sh
dependencies.builder1.sh
dependencies.builder2.sh
dependencies.nix
dependencies.sh
dump-db.sh
export-graph.nix
export-graph.sh
export.sh
fetchGit.sh
fetchMercurial.sh
fetchurl.sh
filter-source.nix
filter-source.sh
fixed.builder1.sh
fixed.builder2.sh
fixed.nix
fixed.sh
gc-concurrent.builder.sh
gc-concurrent.nix
gc-concurrent.sh
gc-concurrent2.builder.sh
gc-runtime.nix
gc-runtime.sh
gc.sh
hash-check.nix
hash.sh
import-derivation.nix
import-derivation.sh
init.sh
install-darwin.sh
lang.sh
linux-sandbox.sh
local.mk
logging.sh
misc.sh
multiple-outputs.nix
multiple-outputs.sh
nar-access.nix
nar-access.sh
nix-build.sh
nix-channel.sh
nix-copy-closure.nix
nix-profile.sh
nix-shell.sh
optimise-store.sh
parallel.builder.sh
parallel.nix
parallel.sh
pass-as-file.sh
placeholders.sh
referrers.sh
remote-builds.nix
remote-store.sh
repair.sh
restricted.sh
run.nix
run.sh
secure-drv-outputs.nix
secure-drv-outputs.sh
setuid.nix
shell.nix
shell.shebang.sh
signing.sh
simple.builder.sh
simple.nix
simple.sh
structured-attrs.nix
structured-attrs.sh
tarball.sh
timeout.nix
timeout.sh
user-envs.builder.sh
user-envs.nix
user-envs.sh