aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorDaniel Thornburgh <dthorn@google.com>2023-07-11 15:28:30 -0700
committerDaniel Thornburgh <dthorn@google.com>2023-07-11 16:00:46 -0700
commit580f9f7ef002489d1d4060abde999586cc201ede (patch)
tree8ca21e8255b9ee763b571974208b337057cfabb5 /compiler-rt
parent14c3ab945be9c49964dbf79f13d8ff8df1ff7b72 (diff)
downloadllvm-580f9f7ef002489d1d4060abde999586cc201ede.zip
llvm-580f9f7ef002489d1d4060abde999586cc201ede.tar.gz
llvm-580f9f7ef002489d1d4060abde999586cc201ede.tar.bz2
[llvm-cov][debuginfod] Make test more hermetic
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/test/profile/Linux/binary-id-debuginfod.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler-rt/test/profile/Linux/binary-id-debuginfod.c b/compiler-rt/test/profile/Linux/binary-id-debuginfod.c
index 39a125b..62f50e7 100644
--- a/compiler-rt/test/profile/Linux/binary-id-debuginfod.c
+++ b/compiler-rt/test/profile/Linux/binary-id-debuginfod.c
@@ -1,17 +1,18 @@
// REQUIRES: linux, curl
+// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: %clang_profgen -Wl,--build-id=0x12345678 -fcoverage-mapping -O2 -shared %t/foo.c -o %t/libfoo.so
-// RUN: %clang_profgen -Wl,--build-id=0xabcd1234 -fcoverage-mapping -O2 %t/main.c -L%t -lfoo -o %t.main
-// RUN: rm -rf %t.profdir
-// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw LD_LIBRARY_PATH=%t %run %t.main
+// RUN: %clang_profgen -Wl,--build-id=0xabcd1234 -fcoverage-mapping -O2 %t/main.c -L%t -lfoo -o %t/main
+// RUN: env LLVM_PROFILE_FILE=%t/profdir/default_%m.profraw LD_LIBRARY_PATH=%t %run %t/main
+// RUN: mkdir -p %t/buildid/12345678 %t/buildid/abcd1234
// RUN: mkdir -p %t/buildid/12345678 %t/buildid/abcd1234
// RUN: cp %t/libfoo.so %t/buildid/12345678/debuginfo
-// RUN: cp %t.main %t/buildid/abcd1234/debuginfo
-// RUN: llvm-profdata merge -o %t.profdata %t.profdir/default_*.profraw
-// RUN: env DEBUGINFOD_URLS=file://%t llvm-cov show -instr-profile %t.profdata | FileCheck %s
+// RUN: cp %t/main %t/buildid/abcd1234/debuginfo
+// RUN: llvm-profdata merge -o %t/profdata %t/profdir/default_*.profraw
+// RUN: env DEBUGINFOD_URLS=file://%t llvm-cov show -instr-profile %t/profdata | FileCheck %s
// RUN: echo "bad" > %t/libfoo.so %t/buildid/12345678/debuginfo
// RUN: echo "bad" > %t/buildid/abcd1234/debuginfo
-// RUN: env DEBUGINFOD_URLS=file://%t llvm-cov show -instr-profile %t.profdata -debuginfod=false %t.main | FileCheck %s --check-prefix=NODEBUGINFOD
+// RUN: env DEBUGINFOD_URLS=file://%t llvm-cov show -instr-profile %t/profdata -debuginfod=false %t/main | FileCheck %s --check-prefix=NODEBUGINFOD
// CHECK: 1| 1|void foo(void) {}
// CHECK: 2| 1|void bar(void) {}