From 9ea0833b6e8269e2148bbc34cf2e81ba0fa6d7b2 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Tue, 14 Jun 2016 22:53:29 +0000 Subject: [PATCH] Fix ubsan/coverage test to put coverage file in a subdirectory. By default coverage is dumped to the current directory, which may not always be writable. llvm-svn: 272732 --- compiler-rt/test/ubsan/TestCases/coverage.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler-rt/test/ubsan/TestCases/coverage.cc b/compiler-rt/test/ubsan/TestCases/coverage.cc index d34e570f8671..2f3caccbf894 100644 --- a/compiler-rt/test/ubsan/TestCases/coverage.cc +++ b/compiler-rt/test/ubsan/TestCases/coverage.cc @@ -1,7 +1,8 @@ +// RUN: mkdir -p %T/coverage // RUN: %clangxx -O1 -fsanitize-coverage=func %s -o %t -// RUN: %env_ubsan_opts=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 +// RUN: %env_ubsan_opts=coverage=1:coverage_bitset=1:verbosity=1:coverage_dir=%T/coverage %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 // RUN: %clangxx -O1 -fsanitize-coverage=bb %s -o %t -// RUN: %env_ubsan_opts=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2 +// RUN: %env_ubsan_opts=coverage=1:coverage_bitset=1:verbosity=1:coverage_dir=%T/coverage %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2 // // UNSUPPORTED: ubsan-tsan // UNSUPPORTED: android