[llvm] [AMDGPU][test] fix the error case in update_mc_test_check script (PR #112731)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 09:32:30 PDT 2024


================
@@ -97,8 +109,16 @@ def getStdCheckLine(prefix, output, mc_mode):
     return o
 
 
-def getErrCheckLine(prefix, output, mc_mode):
-    return COMMENT[mc_mode] + " " + prefix + ": " + ":[[@LINE-1]]" + output + "\n"
+def getErrCheckLine(prefix, output, mc_mode, line_offset=1):
+    return (
+        COMMENT[mc_mode]
+        + " "
+        + prefix
+        + ": "
+        + ":[[@LINE-{}]]".format(line_offset)
----------------
broxigarchen wrote:

I can think surely we can use f string. It seems the trend is to switch to f string? I will keep that in mind.

https://github.com/llvm/llvm-project/pull/112731


More information about the llvm-commits mailing list