aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch
blob: 98a6fbf10bf18ceb410779245e90c0de23cb5b6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- 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
 }