@@ -14,9 +14,9 @@ clearStore
14
14
clearCache
15
15
outPath=$( nix-build dependencies.nix --no-out-link)
16
16
17
- nix copy --to file://" $cacheDir " " $outPath "
17
+ nix copy --to " file://$cacheDir " " $outPath "
18
18
19
- readarray -t paths < <( nix path-info --all --json --store file://" $cacheDir " | jq ' keys|sort|.[]' -r)
19
+ readarray -t paths < <( nix path-info --all --json --store " file://$cacheDir " | jq ' keys|sort|.[]' -r)
20
20
[[ " ${# paths[@]} " -eq 3 ]]
21
21
for path in " ${paths[@]} " ; do
22
22
[[ " $path " =~ -d ependencies-input-0$ ]] \
@@ -25,15 +25,15 @@ for path in "${paths[@]}"; do
25
25
done
26
26
27
27
# Test copying build logs to the binary cache.
28
- expect 1 nix log --store file://" $cacheDir " " $outPath " 2>&1 | grep ' is not available'
29
- nix store copy-log --to file://" $cacheDir " " $outPath "
30
- nix log --store file://" $cacheDir " " $outPath " | grep FOO
28
+ expect 1 nix log --store " file://$cacheDir " " $outPath " 2>&1 | grep ' is not available'
29
+ nix store copy-log --to " file://$cacheDir " " $outPath "
30
+ nix log --store " file://$cacheDir " " $outPath " | grep FOO
31
31
rm -rf " $TEST_ROOT /var/log/nix"
32
32
expect 1 nix log " $outPath " 2>&1 | grep ' is not available'
33
- nix log --substituters file://" $cacheDir " " $outPath " | grep FOO
33
+ nix log --substituters " file://$cacheDir " " $outPath " | grep FOO
34
34
35
35
# Test copying build logs from the binary cache.
36
- nix store copy-log --from file://" $cacheDir " " $( nix-store -qd " $outPath " ) " ^' *'
36
+ nix store copy-log --from " file://$cacheDir " " $( nix-store -qd " $outPath " ) " ^' *'
37
37
nix log " $outPath " | grep FOO
38
38
39
39
basicDownloadTests () {
@@ -166,7 +166,7 @@ badKey=$(nix key convert-secret-to-public < "$TEST_ROOT/sk2")
166
166
nix key generate-secret --key-name foo.nixos.org-1 > " $TEST_ROOT /sk3"
167
167
otherKey=$( nix key convert-secret-to-public < " $TEST_ROOT /sk3" )
168
168
169
- _NIX_FORCE_HTTP=' ' nix copy --to file://" $cacheDir " ? secret-key=" $TEST_ROOT " /sk1 " $outPath "
169
+ _NIX_FORCE_HTTP=' ' nix copy --to " file://$cacheDir " ? secret-key=" $TEST_ROOT " /sk1 " $outPath "
170
170
171
171
172
172
# Downloading should fail if we don't provide a key.
@@ -212,7 +212,7 @@ unset _NIX_FORCE_HTTP
212
212
213
213
214
214
# Test 'nix verify --all' on a binary cache.
215
- nix store verify -vvvvv --all --store file://" $cacheDir " --no-trust
215
+ nix store verify -vvvvv --all --store " file://$cacheDir " --no-trust
216
216
217
217
218
218
# Test local NAR caching.
@@ -226,7 +226,7 @@ rm -rfv "$cacheDir/nar"
226
226
227
227
[[ $( nix store cat --store " file://$cacheDir ?local-nar-cache=$narCache " " $outPath /foobar" ) = FOOBAR ]]
228
228
229
- (! nix store cat --store file://" $cacheDir " " $outPath /foobar" )
229
+ (! nix store cat --store " file://$cacheDir " " $outPath /foobar" )
230
230
231
231
232
232
# Test NAR listing generation.
@@ -243,7 +243,7 @@ outPath=$(nix-build --no-out-link -E '
243
243
}
244
244
' )
245
245
246
- nix copy --to file://" $cacheDir " ? write-nar-listing=1 " $outPath "
246
+ nix copy --to " file://$cacheDir " ? write-nar-listing=1 " $outPath "
247
247
248
248
diff -u \
249
249
<( jq -S < " $cacheDir /$( basename " $outPath " | cut -c1-32) .ls" ) \
0 commit comments