[Git][ghc/ghc][wip/req_smp] fix and align req names
doyougnu (@doyougnu)
gitlab at gitlab.haskell.org
Fri Dec 23 15:09:41 UTC 2022
doyougnu pushed to branch wip/req_smp at Glasgow Haskell Compiler / GHC
Commits:
393f5619 by doyougnu at 2022-12-23T10:09:15-05:00
fix and align req names
- - - - -
10 changed files:
- testsuite/config/ghc
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/driver/T14075/all.T
- testsuite/tests/driver/T20030/test1/all.T
- testsuite/tests/driver/j-space/all.T
- testsuite/tests/driver/t22391/all.T
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/rts/all.T
- testsuite/tests/typecheck/should_fail/all.T
Changes:
=====================================
testsuite/config/ghc
=====================================
@@ -246,7 +246,7 @@ def get_compiler_info():
# try to find the -N flag in tho help output
supported = re.search("-N\[<n>\]" , p.stderr.decode("utf-8"))
- config.host_has_smp = True if supported else False
+ config.host_with_smp = True if supported else False
config.have_vanilla = compiler_supports_way([])
config.have_dynamic = compiler_supports_way(['-dynamic'])
=====================================
testsuite/driver/testglobals.py
=====================================
@@ -148,7 +148,7 @@ class TestConfig:
self.ghc_dynamic = False
# Does the host RTS have SMP support?
- self.host_has_smp = True
+ self.host_with_smp = True
# Does the target have SMP support?
self.target_with_smp = True
=====================================
testsuite/driver/testlib.py
=====================================
@@ -296,6 +296,15 @@ def req_th( name, opts ):
if ghc_dynamic():
return _omit_ways(name, opts, ['profasm', 'profthreaded'])
+def req_host_smp( name, opts ):
+ """
+ Mark a test as requiring the host to be linked with an RTS that supports
+ smp. Use this when the test needs to be compiled with smp support, but may
+ not necessarily be run.
+ """
+ if not config.host_with_smp:
+ opts.skip = True
+
def req_target_smp( name, opts ):
"""
Mark a test as requiring smp when run on the target. If the target does not
@@ -303,14 +312,6 @@ def req_target_smp( name, opts ):
smp support.
"""
if not config.target_with_smp:
- opts.skip = True
-
-def req_ghc_smp( name, opts ):
- """
- Mark a test as requiring smp to compile. Use this when the test needs to
- be compiled with smp support, but may not necessarily be run.
- """
- if not config.ghc_has_smp:
opts.expect = 'fail'
def ignore_stdout(name, opts):
=====================================
testsuite/tests/driver/T14075/all.T
=====================================
@@ -1,6 +1,6 @@
test('T14075',
[ extra_files(['F.hs', 'F.hs-boot', 'O.hs', 'V.hs', 'V.hs-boot'])
- , req_ghc_smp # uses ghc --make -j2
+ , req_host_smp # uses ghc --make -j2
, js_broken(22261)
],
makefile_test, [])
=====================================
testsuite/tests/driver/T20030/test1/all.T
=====================================
@@ -9,6 +9,6 @@ test('T20030_test1j',
[ extra_files([ 'A.hs-boot' , 'A.hs' , 'B.hs' , 'C.hs-boot' , 'C.hs'
, 'D.hs' , 'E.hs-boot' , 'E.hs' , 'F.hs' , 'G.hs' , 'H.hs'
, 'I.hs', 'J.hs-boot', 'J.hs', 'K.hs' ])
- , req_ghc_smp
+ , req_target_smp
],
multimod_compile, ['I.hs K.hs', '-v1 -j'])
=====================================
testsuite/tests/driver/j-space/all.T
=====================================
@@ -1 +1 @@
-test('jspace', [extra_files(['genJspace']), req_ghc_smp], makefile_test, ['jspace'])
+test('jspace', [extra_files(['genJspace']), req_target_smp], makefile_test, ['jspace'])
=====================================
testsuite/tests/driver/t22391/all.T
=====================================
@@ -1,5 +1,5 @@
test('t22391', [extra_files(['src'])],
multimod_compile, ['Lib', '-v1 -Wall -fhide-source-paths -isrc -fdefer-diagnostics'])
-test('t22391j', [req_ghc_smp, extra_files(['src'])],
+test('t22391j', [req_target_smp, extra_files(['src'])],
multimod_compile, ['Lib', '-v1 -Wall -fhide-source-paths -isrc -fdefer-diagnostics -j2'])
=====================================
testsuite/tests/ffi/should_run/all.T
=====================================
@@ -235,7 +235,7 @@ test('T17471', [omit_ways(['ghci']), req_c], compile_and_run,
['T17471_c.c -optc-D -optcFOO'])
test('IncallAffinity',
- [req_target_smp, req_ghc_smp, only_ways(['threaded1', 'threaded2']),
+ [req_target_smp, req_host_smp, only_ways(['threaded1', 'threaded2']),
# Unregisterised build doesn't support
when(unregisterised(), skip),
req_c],
=====================================
testsuite/tests/rts/all.T
=====================================
@@ -286,7 +286,7 @@ test('stablename001', expect_fail_for(['hpc']), compile_and_run, [''])
test('T7815', [ multi_cpu_race,
extra_run_opts('50000 +RTS -N2 -RTS'),
- req_target_smp, req_ghc_smp,
+ req_target_smp, req_host_smp,
only_ways(['threaded1', 'threaded2']) ], compile_and_run, [''] )
# ignore_stderr because it contains a unique:
@@ -305,10 +305,10 @@ test('T7919', [ when(fast(), skip)
test('T8035', normal, compile_and_run, [''])
-test('T8209', [ req_target_smp, req_ghc_smp, only_ways(threaded_ways), ignore_stdout ],
+test('T8209', [ req_target_smp, req_host_smp, only_ways(threaded_ways), ignore_stdout ],
compile_and_run, [''])
-test('T8242', [ req_target_smp, req_ghc_smp, only_ways(threaded_ways), ignore_stdout ],
+test('T8242', [ req_target_smp, req_host_smp, only_ways(threaded_ways), ignore_stdout ],
compile_and_run, [''])
test('T8124', [ only_ways(threaded_ways), omit_ways(['ghci']),
@@ -330,7 +330,7 @@ test('T9078', only_ways(['threaded1']), compile_and_run, [''])
test('T10017', [ when(opsys('mingw32'), skip)
, when(unregisterised(), skip)
, req_target_smp
- , req_ghc_smp
+ , req_host_smp
, only_ways(threaded_ways), extra_run_opts('+RTS -N2 -RTS') ], compile_and_run, [''])
test('T11108', normal, compile_and_run, [''])
@@ -403,7 +403,7 @@ test('T11788', [ when(ghc_dynamic(), skip)
, req_interp
], makefile_test, ['T11788'])
-test('T10296a', [req_ghc_smp], makefile_test, ['T10296a'])
+test('T10296a', [req_host_smp], makefile_test, ['T10296a'])
test('T10296b', [only_ways(['threaded2'])], compile_and_run, [''])
@@ -457,7 +457,7 @@ test('alloccounter1', js_broken(22261), compile_and_run,
test('nursery-chunks1',
[ extra_run_opts('4 100 +RTS -n32k -A1m -RTS')
- , req_ghc_smp
+ , req_host_smp
, req_target_smp
, only_ways(['threaded1','threaded2'])
],
=====================================
testsuite/tests/typecheck/should_fail/all.T
=====================================
@@ -412,7 +412,7 @@ test('T11990a', normal, compile_fail, [''])
test('T11990b', normal, compile_fail, [''])
test('T12035', [], multimod_compile_fail, ['T12035', '-v0'])
test('T12035j', [ extra_files(['T12035.hs', 'T12035a.hs', 'T12035.hs-boot'])
- , req_ghc_smp
+ , req_host_smp
, js_broken(22261)
], multimod_compile_fail, ['T12035', '-j2 -v0'])
test('T12045b', normal, compile_fail, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/393f5619136bc40db82704132c3c68c1df39c1b9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/393f5619136bc40db82704132c3c68c1df39c1b9
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/20221223/cfe4d826/attachment-0001.html>
More information about the ghc-commits
mailing list