cae260a158
this should be done where we're actually trying to build something, not in the main worker loop that shouldn't have to be aware of such details Change-Id: I07276740c0e2e5591a8ce4828a4bfc705396527e
22 lines
779 B
Bash
22 lines
779 B
Bash
source common.sh
|
|
|
|
drv='
|
|
builtins.derivation {
|
|
name = "foo";
|
|
builder = /bin/sh;
|
|
system = builtins.currentSystem;
|
|
requiredSystemFeatures = [ "glitter" ];
|
|
}
|
|
'
|
|
|
|
# -j0 without remote machines diagnoses build start failure
|
|
! out="$(nix-build 2>&1 -j0 --expr "$drv" \
|
|
--builders '' \
|
|
--system-features 'glitter')"
|
|
<<<"$out" grepQuiet 'error: unable to start any build; either set '\''--max-jobs'\'' to a non-zero value or enable remote builds.'
|
|
|
|
# -j0 with remote machines and missing features also diagnoses
|
|
! out="$(nix-build 2>&1 -j0 --expr "$drv" \
|
|
--builders "ssh://localhost?remote-store=$TEST_ROOT/machine1" \
|
|
--system-features 'glitter')"
|
|
<<<"$out" grepQuiet 'error: unable to start any build; remote machines may not have all required system features.'
|