Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang-format][NFC] Skip remaining tests of the same case upon failure #65540

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

owenca
Copy link
Contributor

@owenca owenca commented Sep 6, 2023

A typical test case goes through the format, stability, ObjC, and messUp tests. If any of theses tests fails, we should skip the remaining tests for the same test case.

@owenca
Copy link
Contributor Author

owenca commented Sep 7, 2023

Before:

.../llvm-project/clang/unittests/Format/FormatTestBase.h:93: Failure
Expected equality of these values:
  Expected.str()
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n    \"x\t\");"
  format(Code, Style, SC_ExpectComplete, Ranges)
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");"
With diff:
@@ -1,2 +1,1 @@
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
-    \"x\t\");
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");

Google Test trace:
.../llvm-project/clang/unittests/Format/FormatTest.cpp:14824: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
    "x	");
.../llvm-project/clang/unittests/Format/FormatTestBase.h:102: Failure
Expected equality of these values:
  Expected.str()
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n    \"x\t\");"
  format(Code, ObjCStyle, SC_ExpectComplete, Ranges)
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");"
With diff:
@@ -1,2 +1,1 @@
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
-    \"x\t\");
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");

Google Test trace:
.../llvm-project/clang/unittests/Format/FormatTest.cpp:14824: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
    "x	");
.../llvm-project/clang/unittests/Format/FormatTestBase.h:90: Failure
Expected equality of these values:
  Expected.str()
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n    \"x\t\");"
  format(Expected, Style, SC_ExpectComplete, Ranges)
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");"
With diff:
@@ -1,2 +1,1 @@
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
-    \"x\t\");
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");

Expected code is not stable
Google Test trace:
.../llvm-project/clang/unittests/Format/FormatTest.cpp:14824: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( "x	");

After:

.../llvm-project/clang/unittests/Format/FormatTestBase.h:90: Failure
Expected equality of these values:
  ExpectedCode
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n    \"x\t\");"
  FormattedCode
    Which is: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");"
With diff:
@@ -1,2 +1,1 @@
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
-    \"x\t\");
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\"x\t\");

Google Test trace:
.../llvm-project/clang/unittests/Format/FormatTest.cpp:14824: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(

@owenca owenca changed the title [clang-format] Skip additional tests of the same case upon failure [clang-format][NFC] Skip additional tests of the same case upon failure Sep 7, 2023
Copy link
Contributor

@HazardyKnusperkeks HazardyKnusperkeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay

A typical test case goes through the format, stability, ObjC, and messUp
tests. If any of theses tests fails, we should skip the remaining tests for
the same test case.
@owenca owenca changed the title [clang-format][NFC] Skip additional tests of the same case upon failure [clang-format][NFC] Skip remaining tests of the same case upon failure Sep 8, 2023
@owenca owenca merged commit 7ecbf6c into llvm:main Sep 8, 2023
1 of 2 checks passed
@owenca owenca deleted the FormatTestBase branch September 8, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants