housekeeping: shellcheck for tests/functional/build-dry.sh

This commit is contained in:
Cameron Dart 2024-06-03 13:47:43 -07:00 committed by John Ericson
parent f615489e0e
commit c127625095

View file

@ -35,17 +35,17 @@ clearStore
clearCache
RESULT=$TEST_ROOT/result-link
rm -f $RESULT
rm -f "$RESULT"
nix-build dependencies.nix -o $RESULT --dry-run
nix-build dependencies.nix -o "$RESULT" --dry-run
[[ ! -h $RESULT ]] || fail "nix-build --dry-run created output link"
nix build -f dependencies.nix -o $RESULT --dry-run
nix build -f dependencies.nix -o "$RESULT" --dry-run
[[ ! -h $RESULT ]] || fail "nix build --dry-run created output link"
nix build -f dependencies.nix -o $RESULT
nix build -f dependencies.nix -o "$RESULT"
[[ -h $RESULT ]]
@ -58,12 +58,12 @@ RES=$(nix build -f dependencies.nix --dry-run --json)
if [[ -z "${NIX_TESTS_CA_BY_DEFAULT-}" ]]; then
echo "$RES" | jq '.[0] | [
(.drvPath | test("'$NIX_STORE_DIR'.*\\.drv")),
(.outputs.out | test("'$NIX_STORE_DIR'"))
(.drvPath | test("'"$NIX_STORE_DIR"'.*\\.drv")),
(.outputs.out | test("'"$NIX_STORE_DIR"'"))
] | all'
else
echo "$RES" | jq '.[0] | [
(.drvPath | test("'$NIX_STORE_DIR'.*\\.drv")),
(.drvPath | test("'"$NIX_STORE_DIR"'.*\\.drv")),
.outputs.out == null
] | all'
fi