summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorCheng Shao <terrorjack@type.dance>2023-04-20 20:07:59 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-27 16:00:35 -0400
commit6f511c36f9845a6e3731e658de4992bfd9806a52 (patch)
tree8af790cbd47cc35319833ecd451543a85aa7dba4 /testsuite
parentb5f00811257670b2a9fc7904bc775f25fea3cf5b (diff)
downloadhaskell-6f511c36f9845a6e3731e658de4992bfd9806a52.tar.gz
testsuite: include target exe extension in heap profile filenames
This patch fixes hp2ps related framework failures when testing the wasm backend by including target exe extension in heap profile filenames.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/driver/testlib.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index d7d7d2251c..5f3f44d035 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -2107,14 +2107,15 @@ def write_file(f: Path, s: str) -> None:
# operate on bytes.
async def check_hp_ok(name: TestName) -> bool:
+ actual_name = name + exe_extension()
opts = getTestOpts()
# do not qualify for hp2ps because we should be in the right directory
- hp2psCmd = 'cd "{opts.testdir}" && {{hp2ps}} {name}'.format(**locals())
+ hp2psCmd = 'cd "{opts.testdir}" && {{hp2ps}} {actual_name}'.format(**locals())
hp2psResult = await runCmd(hp2psCmd, print_output=True)
- actual_ps_path = in_testdir(name, 'ps')
+ actual_ps_path = in_testdir(actual_name, 'ps')
if hp2psResult == 0:
if actual_ps_path.exists():
@@ -2123,15 +2124,15 @@ async def check_hp_ok(name: TestName) -> bool:
if (gsResult == 0):
return True
else:
- print("hp2ps output for " + name + " is not valid PostScript")
+ print("hp2ps output for " + actual_name + " is not valid PostScript")
return False
else:
return True # assume postscript is valid without ghostscript
else:
- print("hp2ps did not generate PostScript for " + name)
+ print("hp2ps did not generate PostScript for " + actual_name)
return False
else:
- print("hp2ps error when processing heap profile for " + name)
+ print("hp2ps error when processing heap profile for " + actual_name)
return False
async def check_prof_ok(name: TestName, way: WayName) -> bool: