aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2022-03-04 16:58:27 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2022-03-04 16:58:27 +0100
commit697d1dac0164001a10ab990a382ad83f2e7628d4 (patch)
tree510c7eae4c99dac9167ba6a71e2c92ffcbf21c70 /tests
parent6a8f1b548fc85af7e065feee93920839ec94fa40 (diff)
tests: grep for string in nix log for remote-builds
Diffstat (limited to 'tests')
-rw-r--r--tests/build-hook-ca-fixed.nix4
-rw-r--r--tests/build-hook.nix4
-rw-r--r--tests/build-remote.sh3
3 files changed, 5 insertions, 6 deletions
diff --git a/tests/build-hook-ca-fixed.nix b/tests/build-hook-ca-fixed.nix
index 899b610a8..4cb9e85d1 100644
--- a/tests/build-hook-ca-fixed.nix
+++ b/tests/build-hook-ca-fixed.nix
@@ -17,7 +17,7 @@ let
input1 = mkDerivation {
shell = busybox;
name = "build-remote-input-1";
- buildCommand = "echo hi; echo FOO > $out";
+ buildCommand = "echo hi-input1; echo FOO > $out";
requiredSystemFeatures = ["foo"];
outputHash = "sha256-FePFYIlMuycIXPZbWi7LGEiMmZSX9FMbaQenWBzm1Sc=";
};
@@ -34,7 +34,7 @@ let
shell = busybox;
name = "build-remote-input-3";
buildCommand = ''
- echo hi
+ echo hi-input3
read x < ${input2}
echo $x BAZ > $out
'';
diff --git a/tests/build-hook.nix b/tests/build-hook.nix
index 3c83e0475..643334caa 100644
--- a/tests/build-hook.nix
+++ b/tests/build-hook.nix
@@ -15,7 +15,7 @@ let
input1 = mkDerivation {
shell = busybox;
name = "build-remote-input-1";
- buildCommand = "echo hi; echo FOO > $out";
+ buildCommand = "echo hi-input1; echo FOO > $out";
requiredSystemFeatures = ["foo"];
};
@@ -30,7 +30,7 @@ let
shell = busybox;
name = "build-remote-input-3";
buildCommand = ''
- echo hi
+ echo hi-input3
read x < ${input2}
echo $x BAZ > $out
'';
diff --git a/tests/build-remote.sh b/tests/build-remote.sh
index 4ecc788a3..a2c3b9ce7 100644
--- a/tests/build-remote.sh
+++ b/tests/build-remote.sh
@@ -57,8 +57,7 @@ nix path-info --store $TEST_ROOT/machine3 --all \
if [[ -z "$CONTENT_ADDRESSED" ]]; then
for i in input1 input3; do
- drv="$(nix-instantiate $file -A passthru.$i --store $TEST_ROOT/machine0 --arg busybox $busybox)"
- nix log --store $TEST_ROOT/machine0 "$drv"
+ nix log --store $TEST_ROOT/machine0 --file "$file" --arg busybox $busybox passthru."$i" | grep hi-$i
done
fi