[llvm] r293825 - [libFuzzer] Fix test because cmd prompt does not expand wildcard.

Marcos Pividori via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 14:39:55 PST 2017

Author: mpividori
Date: Wed Feb  1 16:39:55 2017
New Revision: 293825

URL: http://llvm.org/viewvc/llvm-project?rev=293825&view=rev
[libFuzzer] Fix test because cmd prompt does not expand wildcard.

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


Modified: llvm/trunk/lib/Fuzzer/test/dump_coverage.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/dump_coverage.test?rev=293825&r1=293824&r2=293825&view=diff
--- llvm/trunk/lib/Fuzzer/test/dump_coverage.test (original)
+++ llvm/trunk/lib/Fuzzer/test/dump_coverage.test Wed Feb  1 16:39:55 2017
@@ -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

More information about the llvm-commits mailing list