Skip to content

Commit 72059be

Browse files
[compiler-rt][Profile] Mark Darwin test work with internal shell
This test was using subshells and then passing the results to diff. Write out the results to files before passing to diff as the internal shell does not support subshells.
1 parent a7579fd commit 72059be

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

compiler-rt/test/profile/Darwin/instrprof-debug-info-correlate.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
88
// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
99

10-
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
10+
// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.functions
11+
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.functions
12+
// RUN: diff %t.normal.functions %t.functions
1113

1214
// RUN: %clang_pgogen -o %t.cov -g -mllvm --profile-correlate=debug-info -mllvm -pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
1315
// RUN: env LLVM_PROFILE_FILE=%t.cov.proflite %run %t.cov
@@ -17,7 +19,9 @@
1719
// RUN: env LLVM_PROFILE_FILE=%t.cov.profraw %run %t.cov.normal
1820
// RUN: llvm-profdata merge -o %t.cov.normal.profdata %t.cov.profraw
1921

20-
// RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata)
22+
// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal.functions
23+
// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov.functions
24+
// RUN: diff %t.cov.normal.functions %t.cov.functions
2125

2226
// Test debug info correlate with online merging.
2327

@@ -30,11 +34,15 @@
3034
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
3135
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.profdir/
3236

33-
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
37+
// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.functions
38+
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.functions
39+
// RUN: diff %t.normal.functions %t.functions
3440

3541
// RUN: rm -rf %t.profdir && mkdir %t.profdir
3642
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
3743
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
3844
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov.dSYM %t.profdir/
3945

40-
// RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata)
46+
// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal.functions
47+
// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov.functions
48+
// RUN: diff %t.cov.normal.functions %t.cov.functions

0 commit comments

Comments
 (0)