Skip to content

[test] Fix expected line number in TestRunner.py #73996

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Nov 30, 2023

My #73541 added lines to llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt so what was previously on line 7 is now on line 12.

Before:

After:

This didn't show up in the PR checks, but caused a buildbot failure after merging, https://lab.llvm.org/buildbot/#/builders/139/builds/54597 :

# | ======================================================================
# | FAIL: test_commands (__main__.TestIntegratedTestKeywordParser)
# | ----------------------------------------------------------------------
# | Traceback (most recent call last):
# |   File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/utils/lit/tests/unit/TestRunner.py", line 135, in test_commands
# |     self.assertEqual(value[1].command.strip(), "%dbg(MY_RUN: at line 7)  foo  bar")
# | AssertionError: '%dbg(MY_RUN: at line 12)  foo  bar' != '%dbg(MY_RUN: at line 7)  foo  bar'
# | - %dbg(MY_RUN: at line 12)  foo  bar
# | ?                      ^^
# | + %dbg(MY_RUN: at line 7)  foo  bar
# | ?                      ^

Apologies for the build break 🙀

llvmGH-73541 added lines to
llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt
so what was previously on line 7 is now on line 12.
@llvmbot
Copy link
Member

llvmbot commented Nov 30, 2023

@llvm/pr-subscribers-testing-tools

Author: Stephan T. Lavavej (StephanTLavavej)

Changes

My #73541 added lines to llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt so what was previously on line 7 is now on line 12.

Before:

After:

This didn't show up in the PR checks, but caused a buildbot failure after merging. Apologies for the build break 🙀


Full diff: https://github.com/llvm/llvm-project/pull/73996.diff

1 Files Affected:

  • (modified) llvm/utils/lit/tests/unit/TestRunner.py (+1-1)
diff --git a/llvm/utils/lit/tests/unit/TestRunner.py b/llvm/utils/lit/tests/unit/TestRunner.py
index f1baf51c02f3a11..09470c7b9386ea8 100644
--- a/llvm/utils/lit/tests/unit/TestRunner.py
+++ b/llvm/utils/lit/tests/unit/TestRunner.py
@@ -132,7 +132,7 @@ def test_commands(self):
         value = cmd_parser.getValue()
         self.assertEqual(len(value), 2)  # there are only two run lines
         self.assertEqual(value[0].command.strip(), "%dbg(MY_RUN: at line 4)  baz")
-        self.assertEqual(value[1].command.strip(), "%dbg(MY_RUN: at line 7)  foo  bar")
+        self.assertEqual(value[1].command.strip(), "%dbg(MY_RUN: at line 12)  foo  bar")
 
     def test_boolean(self):
         parsers = self.make_parsers()

@StephanTLavavej StephanTLavavej merged commit 2ee8763 into llvm:main Nov 30, 2023
@StephanTLavavej StephanTLavavej deleted the fix-buildbot branch November 30, 2023 23:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants