[compiler-rt] 6be453e - [debuginfod] Use dedicated cache dir for tests

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 14:29:04 PDT 2023


Author: Daniel Thornburgh
Date: 2023-07-12T14:28:56-07:00
New Revision: 6be453ed7fb788cf6b24dedf7f5221a5eeeff0d3

URL: https://github.com/llvm/llvm-project/commit/6be453ed7fb788cf6b24dedf7f5221a5eeeff0d3
DIFF: https://github.com/llvm/llvm-project/commit/6be453ed7fb788cf6b24dedf7f5221a5eeeff0d3.diff

LOG: [debuginfod] Use dedicated cache dir for tests

Added: 
    

Modified: 
    compiler-rt/test/profile/Linux/binary-id-debuginfod.c
    llvm/test/tools/llvm-debuginfod-find/headers.test

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/Linux/binary-id-debuginfod.c b/compiler-rt/test/profile/Linux/binary-id-debuginfod.c
index 62f50e7fece9ac..86d794526640ed 100644
--- a/compiler-rt/test/profile/Linux/binary-id-debuginfod.c
+++ b/compiler-rt/test/profile/Linux/binary-id-debuginfod.c
@@ -9,10 +9,12 @@
 // 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: mkdir -p %t/debuginfod-cache
+// RUN: env DEBUGINFOD_CACHE_PATH=%t/debuginfod-cache 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: rm -rf %t/debuginfod-cache/*
+// RUN: env DEBUGINFOD_CACHE_PTH=%t/debuginfod-cache 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) {}

diff  --git a/llvm/test/tools/llvm-debuginfod-find/headers.test b/llvm/test/tools/llvm-debuginfod-find/headers.test
index aaf20d44e31791..c838d9fe7dc62d 100644
--- a/llvm/test/tools/llvm-debuginfod-find/headers.test
+++ b/llvm/test/tools/llvm-debuginfod-find/headers.test
@@ -1,14 +1,18 @@
 REQUIRES: curl
 
+RUN: rm -rf %t
+RUN: mkdir -p %t/debuginfod-cache
 RUN: %python %S/Inputs/capture_req.py llvm-debuginfod-find --debuginfo 0 \
 RUN:   | FileCheck --check-prefix NO-HEADERS %s
-RUN: env DEBUGINFOD_HEADERS_FILE=bad %python %S/Inputs/capture_req.py \
+RUN: env DEBUGINFOD_CACHE=%t/debuginfod-cache DEBUGINFOD_HEADERS_FILE=bad %python %S/Inputs/capture_req.py \
 RUN:   llvm-debuginfod-find --debuginfo 0 \
 RUN:   | FileCheck --check-prefix NO-HEADERS %s
-RUN: env DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers %python %S/Inputs/capture_req.py \
+RUN: rm -rf %t/debuginfod-cache/*
+RUN: env DEBUGINFOD_CACHE=%t/debuginfod-cache DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers %python %S/Inputs/capture_req.py \
 RUN:   llvm-debuginfod-find --debuginfo 0 \
 RUN:   | FileCheck --check-prefix HEADERS %s
-RUN: env DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers DEBUGINFOD_URLS=fake not llvm-debuginfod-find --debuginfo 0 2>&1 \
+RUN: rm -rf %t/debuginfod-cache/*
+RUN: env DEBUGINFOD_CACHE=%t/debuginfod-cache DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers DEBUGINFOD_URLS=fake not llvm-debuginfod-find --debuginfo 0 2>&1 \
 RUN:   | FileCheck --check-prefix ERR -DHEADER_FILE=%S/Inputs/headers %s
 
 NO-HEADERS: Accept: */*


        


More information about the llvm-commits mailing list