From 75bae15d6b49f789d2f01d047c8451382c206645 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 26 Jun 2023 12:12:34 +0200 Subject: [PATCH 1/2] lib/path/tests: Add --show-trace This should help troubleshoot errors. Fyi --eval is just a flag, not an option with a value. (cherry picked from commit 050e7e29aac1606a64b7a189b0affbc6a8e497df) --- lib/path/tests/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/path/tests/default.nix b/lib/path/tests/default.nix index 9a31e42828f48..6b8e515f43304 100644 --- a/lib/path/tests/default.nix +++ b/lib/path/tests/default.nix @@ -24,8 +24,9 @@ pkgs.runCommand "lib-path-tests" { export TEST_LIB=$PWD/lib echo "Running unit tests lib/path/tests/unit.nix" - nix-instantiate --eval lib/path/tests/unit.nix \ - --argstr libpath "$TEST_LIB" + nix-instantiate --eval --show-trace \ + --argstr libpath "$TEST_LIB" \ + lib/path/tests/unit.nix echo "Running property tests lib/path/tests/prop.sh" bash lib/path/tests/prop.sh ${toString seed} From e801ad1ecdce8016357d1b33dfa716505b265275 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 26 Jun 2023 12:24:37 +0200 Subject: [PATCH 2/2] lib/path/tests/prop.sh: Add --show-trace (cherry picked from commit e17f4dae6f3c7cb176804be4c5a610ce0612dd71) --- lib/path/tests/prop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/path/tests/prop.sh b/lib/path/tests/prop.sh index e48c6667fa08f..9fea521577836 100755 --- a/lib/path/tests/prop.sh +++ b/lib/path/tests/prop.sh @@ -71,7 +71,7 @@ fi # Precalculate all normalisations with a single Nix call. Calling Nix for each # string individually would take way too long -nix-instantiate --eval --strict --json \ +nix-instantiate --eval --strict --json --show-trace \ --argstr libpath "$TEST_LIB" \ --argstr dir "$tmp/strings" \ "$SCRIPT_DIR"/prop.nix \