summaryrefslogtreecommitdiff
path: root/test/Lexer
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-08-15 19:47:06 +0000
committerKuba Mracek <mracek@apple.com>2017-08-15 19:47:06 +0000
commitd9232a8d2393a568d1e6732eefe09996df5f3cbd (patch)
tree075c6f329229809ce7ee4b1fa2de829283775ab0 /test/Lexer
parent709ce01f5878ac12902d0b31d363ccd5a31fae74 (diff)
[clang] Get rid of "%T" expansions
The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in clang. Differential Revision: https://reviews.llvm.org/D36437 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer')
-rw-r--r--test/Lexer/case-insensitive-include-ms.c10
-rw-r--r--test/Lexer/case-insensitive-include-pr31836.sh6
-rw-r--r--test/Lexer/case-insensitive-include.c14
-rw-r--r--test/Lexer/case-insensitive-system-include.c10
4 files changed, 20 insertions, 20 deletions
diff --git a/test/Lexer/case-insensitive-include-ms.c b/test/Lexer/case-insensitive-include-ms.c
index 86bd8bba68..a7101544fe 100644
--- a/test/Lexer/case-insensitive-include-ms.c
+++ b/test/Lexer/case-insensitive-include-ms.c
@@ -1,10 +1,10 @@
// REQUIRES: case-insensitive-filesystem
-// RUN: mkdir -p %T/apath
-// RUN: cp %S/Inputs/case-insensitive-include.h %T
-// RUN: cd %T
-// RUN: %clang_cc1 -fsyntax-only -fms-compatibility %s -include %s -I %T -verify
-// RUN: %clang_cc1 -fsyntax-only -fms-compatibility -fdiagnostics-parseable-fixits %s -include %s -I %T 2>&1 | FileCheck %s
+// RUN: mkdir -p %t/Output/apath
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/Output
+// RUN: cd %t/Output
+// RUN: %clang_cc1 -fsyntax-only -fms-compatibility %s -include %s -I %t/Output -verify
+// RUN: %clang_cc1 -fsyntax-only -fms-compatibility -fdiagnostics-parseable-fixits %s -include %s -I %t/Output 2>&1 | FileCheck %s
#include "..\Output\.\case-insensitive-include.h"
#include "..\Output\.\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
diff --git a/test/Lexer/case-insensitive-include-pr31836.sh b/test/Lexer/case-insensitive-include-pr31836.sh
index a419f26faf..e842badc7f 100644
--- a/test/Lexer/case-insensitive-include-pr31836.sh
+++ b/test/Lexer/case-insensitive-include-pr31836.sh
@@ -1,9 +1,9 @@
// REQUIRES: case-insensitive-filesystem
// UNSUPPORTED: system-windows
-// RUN: mkdir -p %T
-// RUN: touch %T/case-insensitive-include-pr31836.h
-// RUN: echo "#include \"%T/Case-Insensitive-Include-Pr31836.h\"" | %clang_cc1 -E - 2>&1 | FileCheck %s
+// RUN: mkdir -p %t
+// RUN: touch %t/case-insensitive-include-pr31836.h
+// RUN: echo "#include \"%t/Case-Insensitive-Include-Pr31836.h\"" | %clang_cc1 -E - 2>&1 | FileCheck %s
// CHECK: warning: non-portable path to file
// CHECK-SAME: /case-insensitive-include-pr31836.h
diff --git a/test/Lexer/case-insensitive-include.c b/test/Lexer/case-insensitive-include.c
index 13e5b59942..099555de5f 100644
--- a/test/Lexer/case-insensitive-include.c
+++ b/test/Lexer/case-insensitive-include.c
@@ -1,12 +1,12 @@
// REQUIRES: case-insensitive-filesystem
-// RUN: mkdir -p %T/apath
-// RUN: mkdir -p %T/asystempath
-// RUN: cp %S/Inputs/case-insensitive-include.h %T
-// RUN: cp %S/Inputs/case-insensitive-include.h %T/asystempath/case-insensitive-include2.h
-// RUN: cd %T
-// RUN: %clang_cc1 -fsyntax-only %s -include %s -I %T -isystem %T/asystempath -verify
-// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -I %T -isystem %T/asystempath 2>&1 | FileCheck %s
+// RUN: mkdir -p %t/Output/apath
+// RUN: mkdir -p %t/Output/asystempath
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/Output
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/Output/asystempath/case-insensitive-include2.h
+// RUN: cd %t/Output
+// RUN: %clang_cc1 -fsyntax-only %s -include %s -I %t/Output -isystem %t/Output/asystempath -verify
+// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -I %t/Output -isystem %t/Output/asystempath 2>&1 | FileCheck %s
// Known standard header, so warn:
#include <StdDef.h> // expected-warning {{non-portable path}}
diff --git a/test/Lexer/case-insensitive-system-include.c b/test/Lexer/case-insensitive-system-include.c
index 9d5289cda2..20e0fc6456 100644
--- a/test/Lexer/case-insensitive-system-include.c
+++ b/test/Lexer/case-insensitive-system-include.c
@@ -1,10 +1,10 @@
// REQUIRES: case-insensitive-filesystem
-// RUN: mkdir -p %T/asystempath
-// RUN: cp %S/Inputs/case-insensitive-include.h %T/asystempath/
-// RUN: cd %T
-// RUN: %clang_cc1 -fsyntax-only %s -include %s -isystem %T/asystempath -verify -Wnonportable-system-include-path
-// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -isystem %T/asystempath -Wnonportable-system-include-path 2>&1 | FileCheck %s
+// RUN: mkdir -p %t/asystempath
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/asystempath/
+// RUN: cd %t
+// RUN: %clang_cc1 -fsyntax-only %s -include %s -isystem %t/asystempath -verify -Wnonportable-system-include-path
+// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -isystem %t/asystempath -Wnonportable-system-include-path 2>&1 | FileCheck %s
#include "CASE-INSENSITIVE-INCLUDE.H" // expected-warning {{non-portable path}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:38}:"\"case-insensitive-include.h\""