aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/i18n.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-02-12 16:12:18 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2020-04-30 20:11:32 +0100
commitd1920886a1e3f0e50969399a836a76ecf01d703e (patch)
treeb3c00f42fd36ed8a9056b17aaaafd85efaf091f1 /mesonbuild/modules/i18n.py
parentf107f9b3962167e1ff5014951aa89fdc176ea683 (diff)
downloadmeson-d1920886a1e3f0e50969399a836a76ecf01d703e.zip
meson-d1920886a1e3f0e50969399a836a76ecf01d703e.tar.gz
meson-d1920886a1e3f0e50969399a836a76ecf01d703e.tar.bz2
Skip failing tests when they won't fail in the expected way
Diffstat (limited to 'mesonbuild/modules/i18n.py')
0 files changed, 0 insertions, 0 deletions
llgraphsection-add-type-id-metadata-to-indirect-call-and-targets-1'>users/Prabhuk/sprclangcallgraphsection-add-type-id-metadata-to-indirect-call-and-targets-1 Unnamed repository; edit this file 'description' to name the repository.root
aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2022-10-30 01:58:47 +0700
committerSerge Pavlov <sepavloff@gmail.com>2022-10-30 02:03:12 +0700
commitc1728a40aae31abc0a5d4d07f6f6a6773d803f2c (patch)
tree84b231b8003485e52c52c4a9292e8eb56067679a /llvm/unittests/Support/CommandLineTest.cpp
parentcd9aff8aa87d5397bb674d1e35904314dca72aac (diff)
downloadllvm-c1728a40aae31abc0a5d4d07f6f6a6773d803f2c.zip
llvm-c1728a40aae31abc0a5d4d07f6f6a6773d803f2c.tar.gz
llvm-c1728a40aae31abc0a5d4d07f6f6a6773d803f2c.tar.bz2
Revert "Handle errors in expansion of response files"
This reverts commit 17eb198de934eced784e16ec15e020a574ba07e1. Reverted for investigation, because ClangDriverTests failed on some builders.
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp45
1 files changed, 7 insertions, 38 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index 26e82d1..dd6e122 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -871,7 +871,7 @@ TEST(CommandLineTest, ResponseFiles) {
llvm::BumpPtrAllocator A;
llvm::cl::ExpansionContext ECtx(A, llvm::cl::TokenizeGNUCommandLine);
ECtx.setVFS(&FS).setCurrentDir(TestRoot).setRelativeNames(true);
- ASSERT_FALSE((bool)ECtx.expandResponseFiles(Argv));
+ ASSERT_TRUE(ECtx.expandResponseFiles(Argv));
EXPECT_THAT(Argv, testing::Pointwise(
StringEquality(),
{"test/test", "-flag_1", "-option_1", "-option_2",
@@ -933,14 +933,7 @@ TEST(CommandLineTest, RecursiveResponseFiles) {
#endif
llvm::cl::ExpansionContext ECtx(A, Tokenizer);
ECtx.setVFS(&FS).setCurrentDir(TestRoot);
- llvm::Error Err = ECtx.expandResponseFiles(Argv);
- ASSERT_TRUE((bool)Err);
- SmallString<128> FilePath = SelfFilePath;
- std::error_code EC = FS.makeAbsolute(FilePath);
- ASSERT_FALSE((bool)EC);
- std::string ExpectedMessage =
- std::string("recursive expansion of: '") + std::string(FilePath) + "'";
- ASSERT_TRUE(toString(std::move(Err)) == ExpectedMessage);
+ ASSERT_FALSE(ECtx.expandResponseFiles(Argv));
EXPECT_THAT(Argv,
testing::Pointwise(StringEquality(),
@@ -978,7 +971,7 @@ TEST(CommandLineTest, ResponseFilesAtArguments) {
BumpPtrAllocator A;
llvm::cl::ExpansionContext ECtx(A, cl::TokenizeGNUCommandLine);
ECtx.setVFS(&FS).setCurrentDir(TestRoot);
- ASSERT_FALSE((bool)ECtx.expandResponseFiles(Argv));
+ ASSERT_FALSE(ECtx.expandResponseFiles(Argv));
// ASSERT instead of EXPECT to prevent potential out-of-bounds access.
ASSERT_EQ(Argv.size(), 1 + NON_RSP_AT_ARGS + 2);
@@ -1012,7 +1005,7 @@ TEST(CommandLineTest, ResponseFileRelativePath) {
BumpPtrAllocator A;
llvm::cl::ExpansionContext ECtx(A, cl::TokenizeGNUCommandLine);
ECtx.setVFS(&FS).setCurrentDir(TestRoot).setRelativeNames(true);
- ASSERT_FALSE((bool)ECtx.expandResponseFiles(Argv));
+ ASSERT_TRUE(ECtx.expandResponseFiles(Argv));
EXPECT_THAT(Argv,
testing::Pointwise(StringEquality(), {"test/test", "-flag"}));
}
@@ -1032,7 +1025,7 @@ TEST(CommandLineTest, ResponseFileEOLs) {
llvm::cl::ExpansionContext ECtx(A, cl::TokenizeWindowsCommandLine);
ECtx.setVFS(&FS).setCurrentDir(TestRoot).setMarkEOLs(true).setRelativeNames(
true);
- ASSERT_FALSE((bool)ECtx.expandResponseFiles(Argv));
+ ASSERT_TRUE(ECtx.expandResponseFiles(Argv));
const char *Expected[] = {"clang", "-Xclang", "-Wno-whatever", nullptr,
"input.cpp"};
ASSERT_EQ(std::size(Expected), Argv.size());
@@ -1045,30 +1038,6 @@ TEST(CommandLineTest, ResponseFileEOLs) {
}
}
-TEST(CommandLineTest, BadResponseFile) {
- BumpPtrAllocator A;
- StringSaver Saver(A);
- TempDir ADir("dir", /*Unique*/ true);
- SmallString<128> AFilePath = ADir.path();
- llvm::sys::path::append(AFilePath, "file.rsp");
- std::string AFileExp = std::string("@") + std::string(AFilePath.str());
- SmallVector<const char *, 2> Argv = {"clang", AFileExp.c_str()};
-
- bool Res = cl::ExpandResponseFiles(Saver, cl::TokenizeGNUCommandLine, Argv);
- ASSERT_TRUE(Res);
- ASSERT_EQ(2U, Argv.size());
- ASSERT_STREQ(Argv[0], "clang");
- ASSERT_STREQ(Argv[1], AFileExp.c_str());
-
- std::string ADirExp = std::string("@") + std::string(ADir.path());
- Argv = {"clang", ADirExp.c_str()};
- Res = cl::ExpandResponseFiles(Saver, cl::TokenizeGNUCommandLine, Argv);
- ASSERT_FALSE(Res);
- ASSERT_EQ(2U, Argv.size());
- ASSERT_STREQ(Argv[0], "clang");
- ASSERT_STREQ(Argv[1], ADirExp.c_str());
-}
-
TEST(CommandLineTest, SetDefaultValue) {
cl::ResetCommandLineParser();
@@ -1176,9 +1145,9 @@ TEST(CommandLineTest, ReadConfigFile) {
llvm::BumpPtrAllocator A;
llvm::cl::ExpansionContext ECtx(A, cl::tokenizeConfigFile);
- llvm::Error Result = ECtx.readConfigFile(ConfigFile.path(), Argv);
+ bool Result = ECtx.readConfigFile(ConfigFile.path(), Argv);
- EXPECT_FALSE((bool)Result);
+ EXPECT_TRUE(Result);
EXPECT_EQ(Argv.size(), 13U);
EXPECT_STREQ(Argv[0], "-option_1");
EXPECT_STREQ(Argv[1],