summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/ctu-main.cpp
diff options
context:
space:
mode:
authorGabor Marton <martongabesz@gmail.com>2018-12-07 12:29:02 +0000
committerGabor Marton <martongabesz@gmail.com>2018-12-07 12:29:02 +0000
commit681bcb6dffecd5f0b069eee80a1f2966c7e28029 (patch)
tree73b1123978fe72cfc6d34d5638bb4af49d0d8fed /clang/test/Analysis/ctu-main.cpp
parentb7f30dda39a47b2d566d7cc8a9d7a91af7efa693 (diff)
downloadbcm5719-llvm-681bcb6dffecd5f0b069eee80a1f2966c7e28029.tar.gz
bcm5719-llvm-681bcb6dffecd5f0b069eee80a1f2966c7e28029.zip
[CTU] Eliminate race condition in CTU lit tests
Summary: We plan to introduce additional CTU related lit test. Since lit may run the tests in parallel, it is not safe to use the same directory (%T) for these tests. It is safe to use however test case specific directories (%t). Reviewers: xazax.hun, a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D55129 llvm-svn: 348587
Diffstat (limited to 'clang/test/Analysis/ctu-main.cpp')
-rw-r--r--clang/test/Analysis/ctu-main.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/clang/test/Analysis/ctu-main.cpp b/clang/test/Analysis/ctu-main.cpp
index 33da84962ce..fca750c317b 100644
--- a/clang/test/Analysis/ctu-main.cpp
+++ b/clang/test/Analysis/ctu-main.cpp
@@ -1,8 +1,15 @@
-// RUN: mkdir -p %T/ctudir
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-pch -o %T/ctudir/ctu-other.cpp.ast %S/Inputs/ctu-other.cpp
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-pch -o %T/ctudir/ctu-chain.cpp.ast %S/Inputs/ctu-chain.cpp
-// RUN: cp %S/Inputs/externalFnMap.txt %T/ctudir/
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/ctudir -verify %s
+// RUN: rm -rf %t && mkdir %t
+// RUN: mkdir -p %t/ctudir
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: -emit-pch -o %t/ctudir/ctu-other.cpp.ast %S/Inputs/ctu-other.cpp
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: -emit-pch -o %t/ctudir/ctu-chain.cpp.ast %S/Inputs/ctu-chain.cpp
+// RUN: cp %S/Inputs/externalFnMap.txt %t/ctudir/
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: -analyzer-checker=core,debug.ExprInspection \
+// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
+// RUN: -analyzer-config ctu-dir=%t/ctudir \
+// RUN: -verify %s
#include "ctu-hdr.h"
OpenPOWER on IntegriCloud