Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 1275d360 by Matthew Pickering at 2025-10-03T06:05:56-04:00 testsuite: Use ghci_ways to set ways in PackedDataCon/UnboxedTuples/UnliftedDataTypeInterp tests These tests reimplemented the logic from `valid_way` in order to determine what ways to run. It's easier to use this combination of `only_ways` and `extra_ways` to only run in GHCi ways and always run in GHCi ways. - - - - - 5 changed files: - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/tests/ghci/should_run/PackedDataCon/packeddatacon.T - testsuite/tests/ghci/should_run/UnboxedTuples/unboxedtuples.T - testsuite/tests/ghci/should_run/UnliftedDataTypeInterp/unlifteddatatypeinterp.T Changes: ===================================== testsuite/driver/testglobals.py ===================================== @@ -136,9 +136,12 @@ class TestConfig: # Do we have interpreter support? self.have_interp = False + # Do we have external interpreter support? + self.have_ext_interp = False + # Are we cross-compiling? self.cross = False - + # Does the RTS linker only support loading shared libraries? self.interp_force_dyn = False ===================================== testsuite/driver/testlib.py ===================================== @@ -549,10 +549,12 @@ only_ghci = only_ways([WayName('ghci'), WayName('ghci-opt')]) # ----- def valid_way( way: WayName ) -> bool: - if way in {'ghci', 'ghci-opt', 'ghci-ext'}: + if way in {'ghci', 'ghci-opt'}: return config.have_RTS_linker - if way == 'ghci-ext-prof': - return config.have_RTS_linker and config.have_profiling + if way in {'ghci-ext'}: + return config.have_ext_interp + if way in {'ghci-ext-prof'}: + return config.have_ext_interp and config.have_profiling return True def extra_ways( ways: List[WayName] ): ===================================== testsuite/tests/ghci/should_run/PackedDataCon/packeddatacon.T ===================================== @@ -2,9 +2,8 @@ test('PackedDataCon', [ extra_files(['Obj.hs', 'ByteCode.hs', 'Types.hs', 'Common.hs-incl']), req_interp, req_bco, - extra_ways(['ghci']), - when(config.have_ext_interp, extra_ways(['ghci', 'ghci-ext'])), - when(config.have_ext_interp and config.have_profiling, extra_ways(['ghci', 'ghci-ext', 'ghci-ext-prof'])) + extra_ways(ghci_ways), + only_ways(ghci_ways), ], compile_and_run, [''] ===================================== testsuite/tests/ghci/should_run/UnboxedTuples/unboxedtuples.T ===================================== @@ -2,9 +2,8 @@ test('UnboxedTuples', [ extra_files(['Obj.hs', 'ByteCode.hs', 'Common.hs-incl']), req_interp, req_bco, - extra_ways(['ghci']), - when(config.have_ext_interp, extra_ways(['ghci', 'ghci-ext'])), - when(config.have_ext_interp and config.have_profiling, extra_ways(['ghci', 'ghci-ext', 'ghci-ext-prof'])) + only_ways(ghci_ways), + extra_ways(ghci_ways), ], compile_and_run, [''] ===================================== testsuite/tests/ghci/should_run/UnliftedDataTypeInterp/unlifteddatatypeinterp.T ===================================== @@ -2,9 +2,8 @@ test('UnliftedDataTypeInterp', [ extra_files(['Obj.hs', 'ByteCode.hs', 'Types.hs', 'Common.hs-incl']), req_interp, req_bco, - extra_ways(['ghci']), - when(config.have_ext_interp, extra_ways(['ghci', 'ghci-ext'])), - when(config.have_ext_interp and config.have_profiling, extra_ways(['ghci', 'ghci-ext', 'ghci-ext-prof'])) + only_ways(ghci_ways), + extra_ways(ghci_ways), ], compile_and_run, [''] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1275d3607299734228adbbc47bfb69bf... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1275d3607299734228adbbc47bfb69bf... You're receiving this email because of your account on gitlab.haskell.org.