[llvm] [test] Fix expected line number in `TestRunner.py` (PR #73996)

Stephan T. Lavavej via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 14:23:30 PST 2023


https://github.com/StephanTLavavej created https://github.com/llvm/llvm-project/pull/73996

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:
https://github.com/llvm/llvm-project/blob/28412d1800e391c5ba8e7607bb15c74b106d581b/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt#L7-L8

After:
https://github.com/llvm/llvm-project/blob/6fb7c2d713587a061cd281eda917746750559380/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt#L12-L13

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

>From 84dbc06e7c7cf3c3ab2fb68010d9c6f9fc80f3f8 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Thu, 30 Nov 2023 14:14:15 -0800
Subject: [PATCH] Fix expected line number in TestRunner.py.

GH-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.
---
 llvm/utils/lit/tests/unit/TestRunner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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()



More information about the llvm-commits mailing list