1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch
2018-03-01 15:36:27 +01:00

43 lines
1.5 KiB
Diff

--- a/test/suites/debug_prefix_map.bash
+++ b/test/suites/debug_prefix_map.bash
@@ -29,7 +29,7 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
@@ -39,7 +39,7 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
@@ -52,10 +52,10 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
- if ! grep "name" test.o >/dev/null 2>&1; then
+ if ! objdump -g test.o | grep ": name$" >/dev/null 2>&1; then
test_failed "Relocation (name) not found in test.o"
fi
@@ -65,7 +65,7 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
}