diff options
author | Zequan Wu <zequanwu@google.com> | 2020-10-15 22:11:07 -0700 |
---|---|---|
committer | Zequan Wu <zequanwu@google.com> | 2020-10-15 22:13:35 -0700 |
commit | 19ae9b6e21e2491debeb910e2c541be9796f1b13 (patch) | |
tree | 5b33aef712581ed8ad1db2bdfb1e2c905099ec17 | |
parent | 905101c36025fe1c8ecdf9a20cd59db036676073 (diff) | |
download | llvm-19ae9b6e21e2491debeb910e2c541be9796f1b13.zip llvm-19ae9b6e21e2491debeb910e2c541be9796f1b13.tar.gz llvm-19ae9b6e21e2491debeb910e2c541be9796f1b13.tar.bz2 |
[llvm-cov] Fix test cases.
`/dev/null` is treated as regualar file on Windows.
native_separators.c line 11 used relative path which was not correct but worked before because when `SourceFiles` is empty, it add all source files into `SourceFiles`.
-rw-r--r-- | llvm/test/tools/llvm-cov/native_separators.c | 2 | ||||
-rw-r--r-- | llvm/test/tools/llvm-cov/warnings.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/tools/llvm-cov/native_separators.c b/llvm/test/tools/llvm-cov/native_separators.c index 8ab1a73..3c768e1 100644 --- a/llvm/test/tools/llvm-cov/native_separators.c +++ b/llvm/test/tools/llvm-cov/native_separators.c @@ -8,7 +8,7 @@ // RUN: llvm-profdata merge %S/Inputs/double_dots.proftext -o %t.profdata // RUN: llvm-cov show %S/Inputs/native_separators.covmapping -instr-profile=%t.profdata -o %t.dir // RUN: FileCheck -check-prefixes=TEXT-INDEX -input-file=%t.dir/index.txt %s -// RUN: llvm-cov show -format=html %S/Inputs/native_separators.covmapping -instr-profile=%t.profdata -path-equivalence=/tmp,%S ../llvm-"config"/../llvm-"cov"/native_separators.c -o %t.dir +// RUN: llvm-cov show -format=html %S/Inputs/native_separators.covmapping -instr-profile=%t.profdata -path-equivalence=/tmp,%S %S/../llvm-"config"/../llvm-"cov"/native_separators.c -o %t.dir // RUN: FileCheck -check-prefixes=HTML-INDEX -input-file=%t.dir/index.html %s // RUN: llvm-cov show -format=html %S/Inputs/native_separators.covmapping -instr-profile=%t.profdata -path-equivalence=/tmp,%S %s -o %t.dir // RUN: FileCheck -check-prefixes=HTML -input-file=%t.dir/coverage/tmp/native_separators.c.html %s diff --git a/llvm/test/tools/llvm-cov/warnings.h b/llvm/test/tools/llvm-cov/warnings.h index 5bd62be..20bbf74 100644 --- a/llvm/test/tools/llvm-cov/warnings.h +++ b/llvm/test/tools/llvm-cov/warnings.h @@ -1,13 +1,13 @@ -// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S /dev/null | FileCheck %s -allow-empty -check-prefix=FAKE-FILE-STDOUT -// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S /dev/null 2>&1 | FileCheck %s -check-prefix=FAKE-FILE-STDERR +// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S | FileCheck %s -allow-empty -check-prefix=FAKE-FILE-STDOUT +// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S 2>&1 | FileCheck %s -check-prefix=FAKE-FILE-STDERR // RUN: not llvm-cov report %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -format=html // RUN: not llvm-cov export %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -format=html // FAKE-FILE-STDOUT-NOT: warning: The file '{{.*}}' isn't covered. // FAKE-FILE-STDERR: warning: The file '{{.*}}' isn't covered. -// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S -name ".*" /dev/null | FileCheck %s -allow-empty -check-prefix=FAKE-FUNC-STDOUT -// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S -name-regex ".*" /dev/null 2>&1 | FileCheck %s -check-prefix=FAKE-FUNC-STDERR +// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S -name ".*" | FileCheck %s -allow-empty -check-prefix=FAKE-FUNC-STDOUT +// RUN: llvm-cov show %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S -name-regex ".*" 2>&1 | FileCheck %s -check-prefix=FAKE-FUNC-STDERR // FAKE-FUNC-STDOUT-NOT: warning: Could not read coverage for '{{.*}}'. // FAKE-FUNC-STDERR: Could not read coverage for '{{.*}}'. |