[Git][ghc/ghc][wip/backports-9.8] 2 commits: testsuite: Give the pre_cmd for mhu-perf more time

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Oct 3 15:30:29 UTC 2024



Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC


Commits:
930eb181 by Matthew Craven at 2024-10-03T11:30:15-04:00
testsuite: Give the pre_cmd for mhu-perf more time

(cherry picked from commit dba03aababff057c03e2d92677de02d8375cd23a)

- - - - -
0c24f3e2 by Cheng Shao at 2024-10-03T11:30:15-04:00
testsuite: give pre_cmd for mhu-perf 5x time

(cherry picked from commit 0820750140af2972ca254a42c0fdc537f3b7c447)

- - - - -


3 changed files:

- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/driver/multipleHomeUnits/mhu-perf/all.T


Changes:

=====================================
testsuite/driver/testglobals.py
=====================================
@@ -452,6 +452,7 @@ class TestOptions:
        self.combined_output = False
 
        # How should the timeout be adjusted on this test?
+       self.pre_cmd_timeout_multiplier = 1.0
        self.compile_timeout_multiplier = 1.0
        self.run_timeout_multiplier = 1.0
 


=====================================
testsuite/driver/testlib.py
=====================================
@@ -549,6 +549,12 @@ def signal_exit_code( val: int ):
 
 # -----
 
+def pre_cmd_timeout_multiplier( val: float ):
+    return lambda name, opts, v=val: _pre_cmd_timeout_multiplier(name, opts, v)
+
+def _pre_cmd_timeout_multiplier( name, opts, v ):
+    opts.pre_cmd_timeout_multiplier = v
+
 def compile_timeout_multiplier( val: float ):
     return lambda name, opts, v=val: _compile_timeout_multiplier(name, opts, v)
 
@@ -1367,7 +1373,9 @@ async def do_test(name: TestName,
         exit_code = await runCmd('cd "{0}" && {1}'.format(opts.testdir, override_options(opts.pre_cmd)),
                            stdout = stdout_path,
                            stderr = stderr_path,
-                           print_output = config.verbose >= 3)
+                           print_output = config.verbose >= 3,
+                           timeout_multiplier = opts.pre_cmd_timeout_multiplier,
+                           )
 
         # If user used expect_broken then don't record failures of pre_cmd
         if exit_code != 0 and opts.expect not in ['fail']:


=====================================
testsuite/tests/driver/multipleHomeUnits/mhu-perf/all.T
=====================================
@@ -4,7 +4,8 @@ test('mhu-perf',
        pre_cmd('$MAKE -s --no-print-directory mhu-perf'),
        js_broken(22349),
        when(arch('wasm32'), skip), # wasm32 doesn't like running Setup/Makefile tests
-       compile_timeout_multiplier(5)
+       pre_cmd_timeout_multiplier(5),
+       compile_timeout_multiplier(5),
      ],
      multiunit_compile,
      [['unitTop1', 'unitTop2'], '-fhide-source-paths'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c6a95d279e39cf2082aeff1ce91262a361d823fb...0c24f3e2de17d486f8ab25b737190d8db3465dfd

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c6a95d279e39cf2082aeff1ce91262a361d823fb...0c24f3e2de17d486f8ab25b737190d8db3465dfd
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241003/ea9658aa/attachment-0001.html>


More information about the ghc-commits mailing list