aboutsummaryrefslogtreecommitdiff
path: root/tests/binary-cache.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/binary-cache.sh')
-rw-r--r--tests/binary-cache.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
index 28af3ca5e..59cdfef2e 100644
--- a/tests/binary-cache.sh
+++ b/tests/binary-cache.sh
@@ -201,3 +201,19 @@ outPath=$(nix-build --no-out-link -E '
nix copy --to file://$cacheDir?write-nar-listing=1 $outPath
[[ $(cat $cacheDir/$(basename $outPath).ls) = '{"version":1,"root":{"type":"directory","entries":{"bar":{"type":"regular","size":4,"narOffset":232},"link":{"type":"symlink","target":"xyzzy"}}}}' ]]
+
+
+# Test debug info index generation.
+clearCache
+
+outPath=$(nix-build --no-out-link -E '
+ with import ./config.nix;
+ mkDerivation {
+ name = "debug-info";
+ buildCommand = "mkdir -p $out/lib/debug/.build-id/02; echo foo > $out/lib/debug/.build-id/02/623eda209c26a59b1a8638ff7752f6b945c26b.debug";
+ }
+')
+
+nix copy --to "file://$cacheDir?index-debug-info=1&compression=none" $outPath
+
+[[ $(cat $cacheDir/debuginfo/02623eda209c26a59b1a8638ff7752f6b945c26b.debug) = '{"archive":"../nar/100vxs724qr46phz8m24iswmg9p3785hsyagz0kchf6q6gf06sw6.nar","member":"lib/debug/.build-id/02/623eda209c26a59b1a8638ff7752f6b945c26b.debug"}' ]]