mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Try to fix quotes that don't go to end with sed
This commit is contained in:
parent
1afac8fbbc
commit
d8ae28617d
11 changed files with 16 additions and 16 deletions
|
@ -7,7 +7,7 @@ source common.sh
|
|||
# shellcheck disable=SC1111
|
||||
needLocalStore "“--no-require-sigs” can’t 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=file://$REMOTE_STORE_DIR
|
||||
|
|
|
@ -13,7 +13,7 @@ mkdir "$TEST_HOME"
|
|||
|
||||
mkdir "$NIX_STORE_DIR"
|
||||
mkdir "$NIX_LOCALSTATE_DIR"
|
||||
mkdir -p "$NIX_LOG_DIR"/drvs
|
||||
mkdir -p "$NIX_LOG_DIR/drvs"
|
||||
mkdir "$NIX_STATE_DIR"
|
||||
mkdir "$NIX_CONF_DIR"
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ nix-store -q --tree "$outPath" | grep '───.*dependencies-input-2'
|
|||
|
||||
echo "output path is $outPath"
|
||||
|
||||
text=$(cat "$outPath"/foobar)
|
||||
text=$(cat "$outPath/foobar")
|
||||
if test "$text" != "FOOBAR"; then exit 1; fi
|
||||
|
||||
deps=$(nix-store -quR "$drvPath")
|
||||
|
|
|
@ -14,7 +14,7 @@ git init "$repo"
|
|||
git -C "$repo" config user.email "foobar@example.com"
|
||||
git -C "$repo" config user.name "Foobar"
|
||||
|
||||
echo utrecht > "$repo"/hello
|
||||
echo utrecht > "$repo/hello"
|
||||
git -C "$repo" add hello
|
||||
git -C "$repo" commit -m 'Bla1'
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ outPath3=$(nix-store -r $drvPath3)
|
|||
touch $outPath3.lock
|
||||
|
||||
rm -f "$NIX_STATE_DIR"/gcroots/foo*
|
||||
ln -s $drvPath2 "$NIX_STATE_DIR"/gcroots/foo
|
||||
ln -s $outPath3 "$NIX_STATE_DIR"/gcroots/foo2
|
||||
ln -s $drvPath2 "$NIX_STATE_DIR/gcroots/foo"
|
||||
ln -s $outPath3 "$NIX_STATE_DIR/gcroots/foo2"
|
||||
|
||||
# Start build #1 in the background. It starts immediately.
|
||||
nix-store -rvv "$drvPath1" &
|
||||
|
|
|
@ -8,8 +8,8 @@ drvPath=$(nix-instantiate dependencies.nix)
|
|||
outPath=$(nix-store -rvv "$drvPath")
|
||||
|
||||
# Set a GC root.
|
||||
rm -f "$NIX_STATE_DIR"/gcroots/foo
|
||||
ln -sf $outPath "$NIX_STATE_DIR"/gcroots/foo
|
||||
rm -f "$NIX_STATE_DIR/gcroots/foo"
|
||||
ln -sf $outPath "$NIX_STATE_DIR/gcroots/foo"
|
||||
|
||||
[ "$(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.
|
||||
if test -e $drvPath; then false; fi
|
||||
|
||||
rm "$NIX_STATE_DIR"/gcroots/foo
|
||||
rm "$NIX_STATE_DIR/gcroots/foo"
|
||||
|
||||
nix-collect-garbage
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ outPath=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg
|
|||
|
||||
# Set a GC root.
|
||||
mkdir -p "$stateB"
|
||||
rm -f "$stateB"/gcroots/foo
|
||||
ln -sf $outPath "$stateB"/gcroots/foo
|
||||
rm -f "$stateB/gcroots/foo"
|
||||
ln -sf $outPath "$stateB/gcroots/foo"
|
||||
|
||||
[ "$(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.
|
||||
cat "$storeBRoot/$outPath"
|
||||
|
||||
rm "$stateB"/gcroots/foo
|
||||
rm "$stateB/gcroots/foo"
|
||||
|
||||
nix-collect-garbage
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ outPath=$(nix-store -q $drvPath)
|
|||
echo "building b..."
|
||||
outPath=$(nix-build multiple-outputs.nix -A b --no-out-link)
|
||||
echo "output path is $outPath"
|
||||
[ "$(cat "$outPath"/file)" = "success" ]
|
||||
[ "$(cat "$outPath/file")" = "success" ]
|
||||
|
||||
# Test nix-build on a derivation with multiple outputs.
|
||||
outPath1=$(nix-build multiple-outputs.nix -A a -o $TEST_ROOT/result)
|
||||
|
|
|
@ -7,7 +7,7 @@ clearStore
|
|||
outPath=$(nix-build --no-out-link readfile-context.nix)
|
||||
|
||||
# Set a GC root.
|
||||
ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo
|
||||
ln -s $outPath "$NIX_STATE_DIR/gcroots/foo"
|
||||
|
||||
# Check that file exists.
|
||||
[ "$(cat $(cat $outPath))" = "Hello World!" ]
|
||||
|
|
|
@ -31,7 +31,7 @@ echo "registering..."
|
|||
nix-store --register-validity < $TEST_ROOT/reg_info
|
||||
|
||||
echo "collecting garbage..."
|
||||
ln -sfn $reference "$NIX_STATE_DIR"/gcroots/ref
|
||||
ln -sfn $reference "$NIX_STATE_DIR/gcroots/ref"
|
||||
nix-store --gc
|
||||
|
||||
if [ -n "$(type -p sqlite3)" -a "$(sqlite3 $NIX_STATE_DIR/db/db.sqlite 'select count(*) from Refs')" -ne 0 ]; then
|
||||
|
|
|
@ -14,7 +14,7 @@ echo "output path is $outPath"
|
|||
|
||||
(! [ -w $outPath ])
|
||||
|
||||
text=$(cat "$outPath"/hello)
|
||||
text=$(cat "$outPath/hello")
|
||||
if test "$text" != "Hello World!"; then exit 1; fi
|
||||
|
||||
# Directed delete: $outPath is not reachable from a root, so it should
|
||||
|
|
Loading…
Reference in a new issue