Try to fix quotes that don't go to end with sed

This commit is contained in:
John Ericson 2024-06-12 12:42:38 -04:00
parent 1afac8fbbc
commit d8ae28617d
11 changed files with 16 additions and 16 deletions

View File

@ -7,7 +7,7 @@ source common.sh
# shellcheck disable=SC1111 # shellcheck disable=SC1111
needLocalStore "“--no-require-sigs” cant be used with the daemon" needLocalStore "“--no-require-sigs” cant be used with the daemon"
rm -rf "$TEST_ROOT"/binary_cache rm -rf "$TEST_ROOT/binary_cache"
export REMOTE_STORE_DIR=$TEST_ROOT/binary_cache export REMOTE_STORE_DIR=$TEST_ROOT/binary_cache
export REMOTE_STORE=file://$REMOTE_STORE_DIR export REMOTE_STORE=file://$REMOTE_STORE_DIR

View File

@ -13,7 +13,7 @@ mkdir "$TEST_HOME"
mkdir "$NIX_STORE_DIR" mkdir "$NIX_STORE_DIR"
mkdir "$NIX_LOCALSTATE_DIR" mkdir "$NIX_LOCALSTATE_DIR"
mkdir -p "$NIX_LOG_DIR"/drvs mkdir -p "$NIX_LOG_DIR/drvs"
mkdir "$NIX_STATE_DIR" mkdir "$NIX_STATE_DIR"
mkdir "$NIX_CONF_DIR" mkdir "$NIX_CONF_DIR"

View File

@ -33,7 +33,7 @@ nix-store -q --tree "$outPath" | grep '───.*dependencies-input-2'
echo "output path is $outPath" echo "output path is $outPath"
text=$(cat "$outPath"/foobar) text=$(cat "$outPath/foobar")
if test "$text" != "FOOBAR"; then exit 1; fi if test "$text" != "FOOBAR"; then exit 1; fi
deps=$(nix-store -quR "$drvPath") deps=$(nix-store -quR "$drvPath")

View File

@ -14,7 +14,7 @@ git init "$repo"
git -C "$repo" config user.email "foobar@example.com" git -C "$repo" config user.email "foobar@example.com"
git -C "$repo" config user.name "Foobar" git -C "$repo" config user.name "Foobar"
echo utrecht > "$repo"/hello echo utrecht > "$repo/hello"
git -C "$repo" add hello git -C "$repo" add hello
git -C "$repo" commit -m 'Bla1' git -C "$repo" commit -m 'Bla1'

View File

@ -20,8 +20,8 @@ outPath3=$(nix-store -r $drvPath3)
touch $outPath3.lock touch $outPath3.lock
rm -f "$NIX_STATE_DIR"/gcroots/foo* rm -f "$NIX_STATE_DIR"/gcroots/foo*
ln -s $drvPath2 "$NIX_STATE_DIR"/gcroots/foo ln -s $drvPath2 "$NIX_STATE_DIR/gcroots/foo"
ln -s $outPath3 "$NIX_STATE_DIR"/gcroots/foo2 ln -s $outPath3 "$NIX_STATE_DIR/gcroots/foo2"
# Start build #1 in the background. It starts immediately. # Start build #1 in the background. It starts immediately.
nix-store -rvv "$drvPath1" & nix-store -rvv "$drvPath1" &

View File

@ -8,8 +8,8 @@ drvPath=$(nix-instantiate dependencies.nix)
outPath=$(nix-store -rvv "$drvPath") outPath=$(nix-store -rvv "$drvPath")
# Set a GC root. # Set a GC root.
rm -f "$NIX_STATE_DIR"/gcroots/foo rm -f "$NIX_STATE_DIR/gcroots/foo"
ln -sf $outPath "$NIX_STATE_DIR"/gcroots/foo ln -sf $outPath "$NIX_STATE_DIR/gcroots/foo"
[ "$(nix-store -q --roots $outPath)" = "$NIX_STATE_DIR/gcroots/foo -> $outPath" ] [ "$(nix-store -q --roots $outPath)" = "$NIX_STATE_DIR/gcroots/foo -> $outPath" ]
@ -42,7 +42,7 @@ cat $outPath/reference-to-input-2/bar
# Check that the derivation has been GC'd. # Check that the derivation has been GC'd.
if test -e $drvPath; then false; fi if test -e $drvPath; then false; fi
rm "$NIX_STATE_DIR"/gcroots/foo rm "$NIX_STATE_DIR/gcroots/foo"
nix-collect-garbage nix-collect-garbage

View File

@ -20,8 +20,8 @@ outPath=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg
# Set a GC root. # Set a GC root.
mkdir -p "$stateB" mkdir -p "$stateB"
rm -f "$stateB"/gcroots/foo rm -f "$stateB/gcroots/foo"
ln -sf $outPath "$stateB"/gcroots/foo ln -sf $outPath "$stateB/gcroots/foo"
[ "$(nix-store -q --roots $outPath)" = "$stateB/gcroots/foo -> $outPath" ] [ "$(nix-store -q --roots $outPath)" = "$stateB/gcroots/foo -> $outPath" ]
@ -46,7 +46,7 @@ nix-collect-garbage
# Check that the root and its dependencies haven't been deleted. # Check that the root and its dependencies haven't been deleted.
cat "$storeBRoot/$outPath" cat "$storeBRoot/$outPath"
rm "$stateB"/gcroots/foo rm "$stateB/gcroots/foo"
nix-collect-garbage nix-collect-garbage

View File

@ -35,7 +35,7 @@ outPath=$(nix-store -q $drvPath)
echo "building b..." echo "building b..."
outPath=$(nix-build multiple-outputs.nix -A b --no-out-link) outPath=$(nix-build multiple-outputs.nix -A b --no-out-link)
echo "output path is $outPath" echo "output path is $outPath"
[ "$(cat "$outPath"/file)" = "success" ] [ "$(cat "$outPath/file")" = "success" ]
# Test nix-build on a derivation with multiple outputs. # Test nix-build on a derivation with multiple outputs.
outPath1=$(nix-build multiple-outputs.nix -A a -o $TEST_ROOT/result) outPath1=$(nix-build multiple-outputs.nix -A a -o $TEST_ROOT/result)

View File

@ -7,7 +7,7 @@ clearStore
outPath=$(nix-build --no-out-link readfile-context.nix) outPath=$(nix-build --no-out-link readfile-context.nix)
# Set a GC root. # Set a GC root.
ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo ln -s $outPath "$NIX_STATE_DIR/gcroots/foo"
# Check that file exists. # Check that file exists.
[ "$(cat $(cat $outPath))" = "Hello World!" ] [ "$(cat $(cat $outPath))" = "Hello World!" ]

View File

@ -31,7 +31,7 @@ echo "registering..."
nix-store --register-validity < $TEST_ROOT/reg_info nix-store --register-validity < $TEST_ROOT/reg_info
echo "collecting garbage..." echo "collecting garbage..."
ln -sfn $reference "$NIX_STATE_DIR"/gcroots/ref ln -sfn $reference "$NIX_STATE_DIR/gcroots/ref"
nix-store --gc nix-store --gc
if [ -n "$(type -p sqlite3)" -a "$(sqlite3 $NIX_STATE_DIR/db/db.sqlite 'select count(*) from Refs')" -ne 0 ]; then if [ -n "$(type -p sqlite3)" -a "$(sqlite3 $NIX_STATE_DIR/db/db.sqlite 'select count(*) from Refs')" -ne 0 ]; then

View File

@ -14,7 +14,7 @@ echo "output path is $outPath"
(! [ -w $outPath ]) (! [ -w $outPath ])
text=$(cat "$outPath"/hello) text=$(cat "$outPath/hello")
if test "$text" != "Hello World!"; then exit 1; fi if test "$text" != "Hello World!"; then exit 1; fi
# Directed delete: $outPath is not reachable from a root, so it should # Directed delete: $outPath is not reachable from a root, so it should