From 5540470f642a3118439996cbcde7d90530588eb5 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 18 Jun 2021 16:44:03 -0700 Subject: [PATCH] [profile][test] Delete profraw directory so that tests are immune to format version upgrade --- compiler-rt/test/profile/instrprof-gc-sections.c | 3 +++ compiler-rt/test/profile/instrprof-lto-pgogen.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler-rt/test/profile/instrprof-gc-sections.c b/compiler-rt/test/profile/instrprof-gc-sections.c index cbf3e35..8bbd26d 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 3538f26..aa24786 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 -- 2.7.4