From: Gabor Marton Date: Fri, 7 Dec 2018 12:29:02 +0000 (+0000) Subject: [CTU] Eliminate race condition in CTU lit tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b5557f472dd727711881107c4a09fbd0302ccc5;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348587 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/ctu-main.cpp b/test/Analysis/ctu-main.cpp index 33da84962c..fca750c317 100644 --- a/test/Analysis/ctu-main.cpp +++ b/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"