Browse Source

Prefer 'env not' over 'not env' in tests.

That way, lit's builtin 'env' command can be used for the 'env' bit.

Also it's clearer that way that the 'not' shouldn't cover 'env'
failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374749 91177308-0d34-0410-b5e6-96231b3b80d8
Nico Weber 5 năm trước cách đây
mục cha
commit
8b9cd18362

+ 4 - 4
test/Driver/crash-report-crashfile.m

@@ -2,14 +2,14 @@
 // RUN: rm -rf %t
 // RUN: mkdir -p %t/i %t/m %t
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s \
 // RUN:   -I %S/Inputs/module -isysroot %/t/i/ \
 // RUN:   -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | \
 // RUN:   FileCheck -check-prefix=CRASH_ENV %s
 
-// RUN: not env TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -gen-reproducer -fsyntax-only %s \
+// RUN: env TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -gen-reproducer -fsyntax-only %s \
 // RUN:   -I %S/Inputs/module -isysroot %/t/i/ \
 // RUN:   -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | \
 // RUN:   FileCheck -check-prefix=CRASH_FLAG %s

+ 1 - 1
test/Driver/crash-report-null.test

@@ -1,4 +1,4 @@
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH=1 not %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
 
 // FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
 // XFAIL: windows-gnu

+ 2 - 2
test/Modules/crash-vfs-headermaps.m

@@ -5,8 +5,8 @@
 // RUN: echo '// Foo.h' > %t/i/Foo.framework/Headers/Foo.h
 // RUN: %hmaptool write %S/../Preprocessor/Inputs/headermap-rel/foo.hmap.json %t/i/foo.hmap
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
 // RUN:     -I %t/i/foo.hmap -F %t/i 2>&1 | FileCheck %s
 
 // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh

+ 2 - 2
test/Modules/crash-vfs-include-pch.m

@@ -8,8 +8,8 @@
 // RUN:     -fmodules-cache-path=%t/cache -O0 \
 // RUN:     -isystem %S/Inputs/System/usr/include
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang %s -E -include-pch %t/out/pch-used.h.pch -fmodules -nostdlibinc \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang %s -E -include-pch %t/out/pch-used.h.pch -fmodules -nostdlibinc \
 // RUN:     -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 \
 // RUN:     -Xclang -fno-validate-pch -isystem %S/Inputs/System/usr/include \
 // RUN:     -o %t/output.E 2>&1 | FileCheck %s

+ 2 - 2
test/Modules/crash-vfs-ivfsoverlay.m

@@ -6,9 +6,9 @@
 // RUN: sed -e "s@INPUT_DIR@%/t@g" -e "s@OUT_DIR@%/t/example@g" \
 // RUN:   %S/../VFS/Inputs/vfsoverlay2.yaml > %t/srcvfs.yaml
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
 // RUN:         ASAN_OPTIONS=detect_leaks=0 \
-// RUN: %clang -fsyntax-only -nostdinc %s \
+// RUN: not %clang -fsyntax-only -nostdinc %s \
 // RUN:     -I %S/Inputs/crash-recovery/usr/include \
 // RUN:     -ivfsoverlay %t/srcvfs.yaml \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s

+ 2 - 2
test/Modules/crash-vfs-path-emptydir-entries.m

@@ -10,8 +10,8 @@
 // RUN: mkdir -p %t/i %t/m %t %t/sysroot
 // RUN: cp -R %S/Inputs/crash-recovery/usr %t/i/
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 
 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m

+ 2 - 2
test/Modules/crash-vfs-path-symlink-component.m

@@ -11,8 +11,8 @@
 // RUN: cp -R %S/Inputs/crash-recovery/usr %t/i/
 // RUN: ln -s include/tcl-private %t/i/usr/x
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 
 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m

+ 2 - 2
test/Modules/crash-vfs-path-symlink-topheader.m

@@ -12,8 +12,8 @@
 // RUN: rm -f %t/i/usr/include/pthread_impl.h
 // RUN: ln -s pthread/pthread_impl.h %t/i/usr/include/pthread_impl.h
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 
 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m

+ 2 - 2
test/Modules/crash-vfs-path-traversal.m

@@ -9,8 +9,8 @@
 // RUN: rm -rf %t
 // RUN: mkdir -p %t/i %t/m %t
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %S/Inputs/crash-recovery -isysroot %/t/i/    \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %S/Inputs/crash-recovery -isysroot %/t/i/ \
 // RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 
 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m

+ 2 - 2
test/Modules/crash-vfs-relative-incdir.m

@@ -4,8 +4,8 @@
 // RUN: mkdir -p %t/m
 // RUN: cd %S/Inputs/crash-recovery/usr
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -nostdinc %s -Iinclude \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -nostdinc %s -Iinclude \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 
 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m

+ 2 - 2
test/Modules/crash-vfs-relative-overlay.m

@@ -6,8 +6,8 @@
 // RUN: rm -rf %t
 // RUN: mkdir -p %t/i %t/m %t
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -nostdinc %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -nostdinc %s \
 // RUN:     -I %S/Inputs/crash-recovery/usr/include -isysroot %/t/i/ \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 

+ 2 - 2
test/Modules/crash-vfs-run-reproducer.m

@@ -3,8 +3,8 @@
 // RUN: rm -rf %t
 // RUN: mkdir -p %t/i %t/m %t
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -nostdinc %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -nostdinc %s \
 // RUN:     -I %S/Inputs/crash-recovery/usr/include -isysroot %/t/i/ \
 // RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 

+ 2 - 2
test/Modules/crash-vfs-umbrella-frameworks.m

@@ -9,8 +9,8 @@
 // RUN: mkdir -p %t/i/Frameworks/A.framework/Frameworks
 // RUN: ln -s ../../B.framework %t/i/Frameworks/A.framework/Frameworks/B.framework
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -nostdinc -fsyntax-only %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -nostdinc -fsyntax-only %s \
 // RUN:     -F %/t/i/Frameworks -fmodules \
 // RUN:     -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
 

+ 1 - 1
test/Tooling/auto-detect-from-source-parent-of-cwd.cpp

@@ -4,7 +4,7 @@
 // RUN: cp "%s" "%t/abc/def/ijk/qwe/test.cpp"
 // RUN: ln -sf %t/abc/def %t/abc/def2
 // RUN: cd %t/abc/def2
-// RUN: not env PWD="%t/abc/def" clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
+// RUN: env PWD="%t/abc/def" not clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
 
 // CHECK: C++ requires
 // CHECK: /abc/def/ijk/qwe/test.cpp

+ 1 - 1
test/Tooling/clang-check-pwd.cpp

@@ -4,7 +4,7 @@
 // RUN: cp "%s" "%t/test.cpp"
 // RUN: ln -sf %t %t.foobar
 // RUN: cd %t
-// RUN: not env PWD="%t.foobar" clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
+// RUN: env PWD="%t.foobar" not clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
 // FIXME: Make the above easier.
 
 // CHECK: C++ requires