[compiler-rt] 5540470 - [profile][test] Delete profraw directory so that tests are immune to format version upgrade

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 16:44:10 PDT 2021


Author: Fangrui Song
Date: 2021-06-18T16:44:03-07:00
New Revision: 5540470f642a3118439996cbcde7d90530588eb5

URL: https://github.com/llvm/llvm-project/commit/5540470f642a3118439996cbcde7d90530588eb5
DIFF: https://github.com/llvm/llvm-project/commit/5540470f642a3118439996cbcde7d90530588eb5.diff

LOG: [profile][test] Delete profraw directory so that tests are immune to format version upgrade

Added: 
    

Modified: 
    compiler-rt/test/profile/instrprof-gc-sections.c
    compiler-rt/test/profile/instrprof-lto-pgogen.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/instrprof-gc-sections.c b/compiler-rt/test/profile/instrprof-gc-sections.c
index cbf3e35aaf0e4..8bbd26d29cbf2 100644
--- a/compiler-rt/test/profile/instrprof-gc-sections.c
+++ b/compiler-rt/test/profile/instrprof-gc-sections.c
@@ -1,5 +1,6 @@
 // REQUIRES: linux, lld-available
 
+// RUN: rm -rf %t.profraw
 // RUN: %clang_profgen=%t.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -o %t %s
 // RUN: %run %t
 // RUN: llvm-profdata merge -o %t.profdata %t.profraw
@@ -9,6 +10,7 @@
 // RUN: llvm-readelf -x __llvm_prf_names %t | FileCheck %s -check-prefix=PRF_NAMES
 // RUN: llvm-size -A %t | FileCheck %s -check-prefix=PRF_CNTS
 
+// RUN: rm -rf %t.lto.profraw
 // RUN: %clang_lto_profgen=%t.lto.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -flto -o %t.lto %s
 // RUN: %run %t.lto
 // RUN: llvm-profdata merge -o %t.lto.profdata %t.lto.profraw
@@ -27,6 +29,7 @@
 // Note: We also check the IR instrumentation and expect foo() to be garbage
 // collected as well.
 
+// RUN: rm -rf %t.pgo.profraw
 // RUN: %clang_pgogen=%t.pgo.profraw -fuse-ld=lld -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -o %t.pgo %s
 // RUN: %run %t.pgo
 // RUN: llvm-profdata merge -o %t.pgo.profdata %t.pgo.profraw

diff  --git a/compiler-rt/test/profile/instrprof-lto-pgogen.c b/compiler-rt/test/profile/instrprof-lto-pgogen.c
index 3538f269f510d..aa24786a1d7c5 100644
--- a/compiler-rt/test/profile/instrprof-lto-pgogen.c
+++ b/compiler-rt/test/profile/instrprof-lto-pgogen.c
@@ -1,6 +1,7 @@
 // REQUIRES: binutils_lto
 
-// RUN: %clang_pgogen=%t.profraw -fuse-ld=bfd -flto %s -o %t
+// RUN: rm -rf %t.profraw
+// RUN: %clang_pgogen=%t.profraw/ -fuse-ld=bfd -flto %s -o %t
 // RUN: %run %t
 // RUN: llvm-profdata merge %t.profraw -o %t.profdata
 // RUN: llvm-profdata show %t.profdata | FileCheck %s


        


More information about the llvm-commits mailing list