Fix test that was never run.
authorPaul Robinson <paul.robinson@sony.com>
Fri, 30 Jul 2021 14:22:56 +0000 (07:22 -0700)
committerPaul Robinson <paul.robinson@sony.com>
Fri, 30 Jul 2021 14:59:29 +0000 (07:59 -0700)
Commit 83df122 (r368334) added 'REQUIRES: linux' to this test, but
because triples are not respected by REQUIRES, that meant it was
invariably Unsupported.  The correct keyword would be 'system-linux'
(checking the host rather than the target).

Because the test was always skipped, commit 0cfd9e5 (r375439) did not
notice that the test modification was incorrect.

This patch corrects the REQUIRES clause and fixes the incorrect
previous patch.

Found after implementing https://reviews.llvm.org/D107162

clang/test/Driver/as-no-warnings.c

index 4338d11..a6671c6 100644 (file)
@@ -2,20 +2,22 @@
 // RUN: %clang -### %s -c -o tmp.o -integrated-as -Wa,--no-warn 2>&1 | FileCheck %s
 
 /// -W is alias for --no-warn.
-// RUN: %clang -### %s -c -o tmp.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,-W 2>&1 | FileCheck -check-prefix=CHECK-NOIAS %s
+// RUN: %clang -### %s -c -o tmp.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,-W 2>&1 | FileCheck -check-prefix=CHECK-NOIASW %s
 // RUN: %clang -### %s -c -o tmp.o -integrated-as -Wa,-W 2>&1 | FileCheck %s
 
 // RUN: %clang %s -c -o %t.o -integrated-as -Wa,--no-warn 2>&1 | FileCheck -allow-empty --check-prefix=CHECK-AS-NOWARN %s
 // RUN: %clang %s -c -o %t.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,--no-warn 2>&1 | FileCheck -allow-empty --check-prefix=CHECK-AS-NOWARN %s
+// RUN: %clang %s -c -o %t.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,-W 2>&1 | FileCheck -allow-empty --check-prefix=CHECK-AS-NOWARN %s
 // RUN: not %clang %s -c -o %t.o -target i686-pc-linux-gnu -integrated-as -Wa,--fatal-warnings 2>&1 | FileCheck --check-prefix=CHECK-AS-FATAL %s
 // RUN: not %clang %s -c -o %t.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,--fatal-warnings 2>&1 | FileCheck --check-prefix=CHECK-AS-FATAL %s
 
 // REQUIRES: clang-driver
 // REQUIRES: x86-registered-target
-// REQUIRES: linux
+// REQUIRES: system-linux
 
 // CHECK: "-cc1" {{.*}} "-massembler-no-warn"
 // CHECK-NOIAS: "--no-warn"
+// CHECK-NOIASW: "-W"
 // CHECK-AS-NOWARN-NOT: warning:
 // CHECK-AS-FATAL-NOT: warning:
 // CHECK-AS-FATAL: error