]> granicus.if.org Git - llvm/commitdiff
[libFuzzer] Fix test because cmd prompt does not expand wildcard.
authorMarcos Pividori <mpividori@google.com>
Wed, 1 Feb 2017 22:39:55 +0000 (22:39 +0000)
committerMarcos Pividori <mpividori@google.com>
Wed, 1 Feb 2017 22:39:55 +0000 (22:39 +0000)
Commands should expand the wildcards on Windows, the cmd prompt doesn't.
Because of that sancov was not finding the needed file.
To deal with this, we use ls and xargs from gnu win utils.

Differential Revision: https://reviews.llvm.org/D29374

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293825 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/test/dump_coverage.test

index af1063d0b031f3a33b9cadfcf2ee50bd3f566273..8df087e0398e147ca0825778f79df8d956f404d4 100644 (file)
@@ -2,7 +2,7 @@ RUN: DIR=%t_workdir
 RUN: BUILD_DIR=$(pwd)
 RUN: rm -rf $DIR && mkdir -p $DIR && cd $DIR
 RUN: not $BUILD_DIR/LLVMFuzzer-NullDerefTest -dump_coverage=1 2>&1 | FileCheck %s
-RUN: sancov -covered-functions *.sancov $BUILD_DIR/LLVMFuzzer-NullDerefTest | FileCheck %s --check-prefix=SANCOV
+RUN: ls *.sancov | xargs sancov -covered-functions $BUILD_DIR/LLVMFuzzer-NullDerefTest* | FileCheck %s --check-prefix=SANCOV
 RUN: $BUILD_DIR/LLVMFuzzer-DSOTest -dump_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO
 RUN: not $BUILD_DIR/LLVMFuzzer-NullDerefTest -dump_coverage=0 2>&1 | FileCheck %s --check-prefix=NOCOV
 RUN: rm -rf $DIR