[libc++] Remove support for .fail.cpp tests
We want to move away from those tests and towards explicit .verify.cpp tests, since those have a simpler model. Differential Revision: https://reviews.llvm.org/D153982
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Make sure the test passes if we don't have clang-verify support and
|
||||
// the test fails to compile.
|
||||
|
||||
// UNSUPPORTED: verify-support
|
||||
|
||||
struct Foo { };
|
||||
typedef Foo::x x;
|
||||
@@ -1,16 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// XFAIL: *
|
||||
|
||||
// Make sure the test DOES NOT pass if we don't have clang-verify support and
|
||||
// the test compiles successfully.
|
||||
|
||||
// UNSUPPORTED: verify-support
|
||||
|
||||
int main(int, char**) { return 0; }
|
||||
@@ -1,19 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// REQUIRES: verify-support
|
||||
|
||||
// XFAIL: *
|
||||
|
||||
// Make sure the test DOES NOT pass if there are no diagnostics, but we didn't
|
||||
// use the 'expected-no-diagnostics' markup.
|
||||
//
|
||||
// Note: For the purpose of this test, make sure the file would otherwise
|
||||
// compile to make sure we really fail due to a lack of markup.
|
||||
|
||||
int main(int, char**) { return 0; }
|
||||
@@ -1,14 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// REQUIRES: verify-support
|
||||
|
||||
// Make sure the test passes if we expected no diagnostics and included
|
||||
// the markup.
|
||||
|
||||
// expected-no-diagnostics
|
||||
@@ -1,17 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// REQUIRES: verify-support
|
||||
|
||||
// Make sure the test passes if it fails at compile-time with the expected
|
||||
// diagnostic.
|
||||
|
||||
struct Foo { };
|
||||
typedef Foo::x x; // expected-error{{no type named 'x' in 'Foo'}}
|
||||
|
||||
int main(int, char**) { return 0; }
|
||||
@@ -1,18 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// REQUIRES: verify-support
|
||||
|
||||
// XFAIL: *
|
||||
|
||||
// Make sure the test DOES NOT pass if the expected diagnostic is wrong.
|
||||
|
||||
struct Foo { };
|
||||
typedef Foo::x x; // expected-error{{this is not found in the errors}}
|
||||
|
||||
int main(int, char**) { return 0; }
|
||||
@@ -218,11 +218,6 @@ class CxxStandardLibraryTest(lit.formats.FileBasedTest):
|
||||
automatically marked as UNSUPPORTED if the compiler
|
||||
does not support Clang-verify.
|
||||
|
||||
FOO.fail.cpp - Compiled with clang-verify if clang-verify is
|
||||
supported, and equivalent to a .compile.fail.cpp
|
||||
test otherwise. This is supported only for backwards
|
||||
compatibility with the test suite.
|
||||
|
||||
|
||||
Substitution requirements
|
||||
===============================
|
||||
@@ -367,21 +362,6 @@ class CxxStandardLibraryTest(lit.formats.FileBasedTest):
|
||||
"%dbg(EXECUTED AS) %{exec} %t.exe",
|
||||
]
|
||||
return self._executeShTest(test, litConfig, steps)
|
||||
# This is like a .verify.cpp test when clang-verify is supported,
|
||||
# otherwise it's like a .compile.fail.cpp test. This is only provided
|
||||
# for backwards compatibility with the test suite.
|
||||
elif filename.endswith(".fail.cpp"):
|
||||
if supportsVerify:
|
||||
steps = [
|
||||
"%dbg(COMPILED WITH) %{{cxx}} %s %{{flags}} %{{compile_flags}} -fsyntax-only -Wno-error {}".format(
|
||||
VERIFY_FLAGS
|
||||
)
|
||||
]
|
||||
else:
|
||||
steps = [
|
||||
"%dbg(COMPILED WITH) ! %{cxx} %s %{flags} %{compile_flags} -fsyntax-only"
|
||||
]
|
||||
return self._executeShTest(test, litConfig, steps)
|
||||
else:
|
||||
return lit.Test.Result(
|
||||
lit.Test.UNRESOLVED, "Unknown test suffix for '{}'".format(filename)
|
||||
|
||||
Reference in New Issue
Block a user