aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-07-13 13:37:22 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-07-13 13:38:01 +0200
commit2900a441f5e2a05bc10186e37b4084acb7eca83c (patch)
tree5e22b7ac814c566ac9a9d3d26286febe20bce177 /tests
parent41bdf429ecc6cb7a1ebdd004649c3cec0511ab22 (diff)
Add a test for DWARF debug info index generation
Diffstat (limited to 'tests')
-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"}' ]]