Skip to content

Commit

Permalink
[clang-tidy] Suppress one unittest on macOS.
Browse files Browse the repository at this point in the history
Possibly a linker bug but I'm in a hurry to fix a buildbot.

Differential Revision: https://reviews.llvm.org/D84453
  • Loading branch information
haoNoQ committed Jul 28, 2020
1 parent 647e861 commit 8c9241a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Expand Up @@ -21,13 +21,24 @@ class TestCheck : public ClangTidyCheck {
}
};

// FIXME: This test seems to cause a strange linking interference
// with the ValidConfiguration.ValidEnumOptions test on macOS.
// If both tests are enabled, this test will fail as if
// runCheckOnCode() is not invoked at all. Looks like a linker bug.
// For now both tests are disabled on macOS. It is not sufficient
// to only disable the other test because this test keeps failing
// under Address Sanitizer, which may be an indication of more
// such linking interference with other tests and this test
// seems to be in the center of it.
#ifndef __APPLE__
TEST(ClangTidyDiagnosticConsumer, SortsErrors) {
std::vector<ClangTidyError> Errors;
runCheckOnCode<TestCheck>("int a;", &Errors);
EXPECT_EQ(2ul, Errors.size());
EXPECT_EQ("type specifier", Errors[0].Message.Message);
EXPECT_EQ("variable", Errors[1].Message.Message);
}
#endif

} // namespace test
} // namespace tidy
Expand Down
Expand Up @@ -223,6 +223,7 @@ TEST(CheckOptionsValidation, ValidIntOptions) {
}

// FIXME: Figure out why this test causes crashes on mac os.
// See also comments around the ClangTidyDiagnosticConsumer.SortsErrors test.
#ifndef __APPLE__
TEST(ValidConfiguration, ValidEnumOptions) {

Expand Down

0 comments on commit 8c9241a

Please sign in to comment.