From a584dc43e6d191a93fb2113a13be311ad4222d7d Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Thu, 7 Mar 2024 08:16:30 +0000
Subject: [PATCH] testsuite: drop exe extension from .hp & .prof filenames

See #24515 for details.

(cherry picked from commit 259495ee3de352d259a07b577f3089b34ddf283f)
---
 testsuite/driver/testlib.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index afb2eab2710..8eed26529d1 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -2227,11 +2227,11 @@ async def check_hp_ok(name: TestName) -> bool:
     opts = getTestOpts()
 
     # do not qualify for hp2ps because we should be in the right directory
-    hp2psCmd = 'cd "{opts.testdir}" && {{hp2ps}} {actual_name}'.format(**locals())
+    hp2psCmd = 'cd "{opts.testdir}" && {{hp2ps}} {name}'.format(**locals())
 
     hp2psResult = await runCmd(hp2psCmd, print_output=True)
 
-    actual_ps_path = in_testdir(actual_name, 'ps')
+    actual_ps_path = in_testdir(name, 'ps')
 
     if hp2psResult == 0:
         if actual_ps_path.exists():
@@ -2240,15 +2240,15 @@ async def check_hp_ok(name: TestName) -> bool:
                 if (gsResult == 0):
                     return True
                 else:
-                    print("hp2ps output for " + actual_name + " is not valid PostScript")
+                    print("hp2ps output for " + name + " is not valid PostScript")
                     return False
             else:
                 return True # assume postscript is valid without ghostscript
         else:
-            print("hp2ps did not generate PostScript for " + actual_name)
+            print("hp2ps did not generate PostScript for " + name)
             return  False
     else:
-        print("hp2ps error when processing heap profile for " + actual_name)
+        print("hp2ps error when processing heap profile for " + name)
         return False
 
 async def check_prof_ok(name: TestName, way: WayName) -> bool:
@@ -2260,7 +2260,7 @@ async def check_prof_ok(name: TestName, way: WayName) -> bool:
     if not expected_prof_path.exists():
         return True
 
-    actual_prof_file = add_suffix(name + exe_extension(), 'prof')
+    actual_prof_file = add_suffix(name, 'prof')
     actual_prof_path = in_testdir(actual_prof_file)
 
     if not actual_prof_path.exists():
-- 
GitLab