summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-07-13 20:57:11 +0100
committerIan Lynagh <igloo@earth.li>2011-07-13 20:57:11 +0100
commitaf63209d7cd8fd016fcebe5f5232f6959f81cab3 (patch)
tree748c93196aafe0bf1e44b55459f49aa8b6f58e3e
parent04801365acedbe8f9d8436d098284c99318ac367 (diff)
downloadhaskell-af63209d7cd8fd016fcebe5f5232f6959f81cab3.tar.gz
Make and use a req_interp helper
Tests can now specify that they require the interpreter (i.e. that they use one of ghci, annotations, TH, etc).
-rw-r--r--testsuite/config/ghc1
-rw-r--r--testsuite/driver/testglobals.py3
-rw-r--r--testsuite/driver/testlib.py4
-rw-r--r--testsuite/tests/ghc-regress/annotations/should_compile/all.T5
-rw-r--r--testsuite/tests/ghc-regress/annotations/should_fail/all.T21
-rw-r--r--testsuite/tests/ghc-regress/driver/all.T2
-rw-r--r--testsuite/tests/ghc-regress/ghc-e/should_run/all.T16
-rw-r--r--testsuite/tests/ghc-regress/ghci/scripts/all.T2
-rw-r--r--testsuite/tests/ghc-regress/ghci/should_run/all.T5
-rw-r--r--testsuite/tests/ghc-regress/layout/all.T3
-rw-r--r--testsuite/tests/ghc-regress/quasiquotation/all.T2
-rw-r--r--testsuite/tests/ghc-regress/quasiquotation/qq001/test.T2
-rw-r--r--testsuite/tests/ghc-regress/quasiquotation/qq002/test.T2
-rw-r--r--testsuite/tests/ghc-regress/quasiquotation/qq003/test.T2
-rw-r--r--testsuite/tests/ghc-regress/quasiquotation/qq004/test.T2
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T2
-rw-r--r--testsuite/tests/ghc-regress/th/2014/all.T5
17 files changed, 49 insertions, 30 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index c3b3ef1fb3..4c614d55d2 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -40,6 +40,7 @@ if (ghc_with_profiling == 1):
config.run_ways.append('profasm')
if (ghc_with_interpreter == 1):
+ config.have_interp = True
config.run_ways.append('ghci')
config.unregisterised = (ghc_unregisterised == 1)
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 152f0febca..0e4ab05c27 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -81,6 +81,9 @@ class TestConfig:
# Do we have profiling support?
self.have_profiling = False
+ # Do we have interpreter support?
+ self.have_interp = False
+
# Do we have shared libraries?
self.have_shared_libs = False
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 2cac0ef3f8..6f4c530620 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -114,6 +114,10 @@ def req_profiling( opts ):
if not config.have_profiling:
opts.expect = 'fail'
+def req_interp( opts ):
+ if not config.have_interp:
+ opts.expect = 'fail'
+
def expect_broken( bug ):
return lambda opts, b=bug: _expect_broken (opts, b )
diff --git a/testsuite/tests/ghc-regress/annotations/should_compile/all.T b/testsuite/tests/ghc-regress/annotations/should_compile/all.T
index 851bf92468..e13c24e72b 100644
--- a/testsuite/tests/ghc-regress/annotations/should_compile/all.T
+++ b/testsuite/tests/ghc-regress/annotations/should_compile/all.T
@@ -5,7 +5,10 @@ setTestOpts(if_compiler_profiled(skip))
# order for this to work with profiling, we would have to build the
# program twice and use -osuf p_o (see the TH_splitE5_prof test). For
# now, just disable the profiling ways.
-test('ann01', omit_ways(['profasm','profthreaded']), compile, ['-v0'])
+test('ann01',
+ [req_interp, omit_ways(['profasm','profthreaded'])],
+ compile,
+ ['-v0'])
""""
Helpful things to C+P:
diff --git a/testsuite/tests/ghc-regress/annotations/should_fail/all.T b/testsuite/tests/ghc-regress/annotations/should_fail/all.T
index 9da685a323..21eaa765c3 100644
--- a/testsuite/tests/ghc-regress/annotations/should_fail/all.T
+++ b/testsuite/tests/ghc-regress/annotations/should_fail/all.T
@@ -1,19 +1,22 @@
test('annfail01', normal, compile_fail, [''])
test('annfail02', normal, compile_fail, [''])
-test('annfail03', normal, compile_fail, [''])
-test('annfail04', extra_clean(['Annfail04_Help.hi', 'Annfail04_Help.o']),
+test('annfail03', req_interp, compile_fail, [''])
+test('annfail04',
+ [req_interp, extra_clean(['Annfail04_Help.hi', 'Annfail04_Help.o'])],
multimod_compile_fail, ['annfail04', '-v0'])
-test('annfail05', extra_clean(['Annfail05_Help.hi', 'Annfail05_Help.o']),
+test('annfail05',
+ [req_interp, extra_clean(['Annfail05_Help.hi', 'Annfail05_Help.o'])],
multimod_compile_fail, ['annfail05', '-v0'])
-test('annfail06', extra_clean(['Annfail06_Help.hi', 'Annfail06_Help.o']),
+test('annfail06',
+ [req_interp, extra_clean(['Annfail06_Help.hi', 'Annfail06_Help.o'])],
multimod_compile_fail, ['annfail06', '-v0'])
-test('annfail07', normal, compile_fail, [''])
-test('annfail08', normal, compile_fail, [''])
-test('annfail09', normal, compile_fail, [''])
-test('annfail10', normal, compile_fail, [''])
+test('annfail07', req_interp, compile_fail, [''])
+test('annfail08', req_interp, compile_fail, [''])
+test('annfail09', req_interp, compile_fail, [''])
+test('annfail10', req_interp, compile_fail, [''])
test('annfail11', normal, compile_fail, [''])
-test('annfail12', normal, compile_fail, ['-v0'])
+test('annfail12', req_interp, compile_fail, ['-v0'])
test('annfail13', normal, compile_fail, [''])
""""
diff --git a/testsuite/tests/ghc-regress/driver/all.T b/testsuite/tests/ghc-regress/driver/all.T
index e1f2ac1345..b7cc9e2580 100644
--- a/testsuite/tests/ghc-regress/driver/all.T
+++ b/testsuite/tests/ghc-regress/driver/all.T
@@ -322,4 +322,4 @@ test('T4437', only_ways(['normal']), compile_and_run, ['-package ghc'])
test('werror', normal, compile_fail, [''])
-test('T706', normal, run_command, ['$MAKE -s --no-print-directory T706'])
+test('T706', req_interp, run_command, ['$MAKE -s --no-print-directory T706'])
diff --git a/testsuite/tests/ghc-regress/ghc-e/should_run/all.T b/testsuite/tests/ghc-regress/ghc-e/should_run/all.T
index bedaaa1f29..6039a4088b 100644
--- a/testsuite/tests/ghc-regress/ghc-e/should_run/all.T
+++ b/testsuite/tests/ghc-regress/ghc-e/should_run/all.T
@@ -1,12 +1,12 @@
setTestOpts(if_compiler_profiled(skip))
-test('ghc-e001', normal, run_command, ['$MAKE --no-print-directory -s ghc-e001'])
-test('ghc-e002', normal, run_command, ['$MAKE --no-print-directory -s ghc-e002'])
-test('ghc-e003', normal, run_command, ['$MAKE --no-print-directory -s ghc-e003'])
-test('ghc-e004', normal, run_command, ['$MAKE --no-print-directory -s ghc-e004'])
-test('ghc-e005', normal, run_command, ['$MAKE --no-print-directory -s ghc-e005'])
+test('ghc-e001', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e001'])
+test('ghc-e002', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e002'])
+test('ghc-e003', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e003'])
+test('ghc-e004', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e004'])
+test('ghc-e005', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e005'])
-test('2228', normal, run_command, ['$MAKE --no-print-directory -s 2228'])
-test('2636', normal, run_command, ['$MAKE --no-print-directory -s 2636'])
-test('3890', normal, run_command, ['$MAKE --no-print-directory -s 3890'])
+test('2228', req_interp, run_command, ['$MAKE --no-print-directory -s 2228'])
+test('2636', req_interp, run_command, ['$MAKE --no-print-directory -s 2636'])
+test('3890', req_interp, run_command, ['$MAKE --no-print-directory -s 3890'])
diff --git a/testsuite/tests/ghc-regress/ghci/scripts/all.T b/testsuite/tests/ghc-regress/ghci/scripts/all.T
index 627adc91e5..f3ddbffc6a 100644
--- a/testsuite/tests/ghc-regress/ghci/scripts/all.T
+++ b/testsuite/tests/ghc-regress/ghci/scripts/all.T
@@ -53,7 +53,7 @@ test('ghci033', normal, ghci_script, ['ghci033.script'])
test('ghci034', normal, ghci_script, ['ghci034.script'])
test('ghci035', normal, ghci_script, ['ghci035.script'])
test('ghci036', normal, ghci_script, ['ghci036.script'])
-test('ghci037', normal, run_command, ['$MAKE -s --no-print-directory ghci037'])
+test('ghci037', req_interp, run_command, ['$MAKE -s --no-print-directory ghci037'])
test('2452', normal, ghci_script, ['2452.script'])
test('T2766', normal, ghci_script, ['T2766.script'])
diff --git a/testsuite/tests/ghc-regress/ghci/should_run/all.T b/testsuite/tests/ghc-regress/ghci/should_run/all.T
index 5301fbe622..41d65f2e32 100644
--- a/testsuite/tests/ghc-regress/ghci/should_run/all.T
+++ b/testsuite/tests/ghc-regress/ghci/should_run/all.T
@@ -11,5 +11,8 @@ test('ghcirun003', just_ghci, compile_and_run, [''])
test('2589', just_ghci, compile_and_run, [''])
test('2881', just_ghci, compile_and_run, [''])
-test('3171', if_platform('i386-unknown-mingw32',skip), run_command,
+test('3171',
+ [if_platform('i386-unknown-mingw32',skip),
+ req_interp],
+ run_command,
['$MAKE -s --no-print-directory 3171'])
diff --git a/testsuite/tests/ghc-regress/layout/all.T b/testsuite/tests/ghc-regress/layout/all.T
index 17e482e1f5..026ad465a0 100644
--- a/testsuite/tests/ghc-regress/layout/all.T
+++ b/testsuite/tests/ghc-regress/layout/all.T
@@ -36,7 +36,8 @@ test('layout006',
['$MAKE -s --no-print-directory layout006'])
test('layout007',
- [extra_clean(['layout007.hi', 'layout007.o']),
+ [req_interp,
+ extra_clean(['layout007.hi', 'layout007.o']),
only_compiler_types(['ghc']),
if_compiler_profiled(skip)],
run_command,
diff --git a/testsuite/tests/ghc-regress/quasiquotation/all.T b/testsuite/tests/ghc-regress/quasiquotation/all.T
index ec046b1261..2fa0427813 100644
--- a/testsuite/tests/ghc-regress/quasiquotation/all.T
+++ b/testsuite/tests/ghc-regress/quasiquotation/all.T
@@ -1,4 +1,4 @@
-test('T3953', only_compiler_types(['ghc']), compile_fail, [''])
+test('T3953', [req_interp, only_compiler_types(['ghc'])], compile_fail, [''])
test('T4150',
[only_compiler_types(['ghc']),
expect_broken(4150),
diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T
index c1dd1daede..2db7546687 100644
--- a/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T
+++ b/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T
@@ -1,2 +1,2 @@
-test('qq001', only_compiler_types(['ghc']),
+test('qq001', [req_interp, only_compiler_types(['ghc'])],
compile_fail, [''])
diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T
index 134a837534..2c39664a85 100644
--- a/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T
+++ b/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T
@@ -1,2 +1,2 @@
-test('qq002', only_compiler_types(['ghc']),
+test('qq002', [req_interp, only_compiler_types(['ghc'])],
compile_fail, [''])
diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T
index 5bb9343c24..9c61d0a11a 100644
--- a/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T
+++ b/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T
@@ -1,2 +1,2 @@
-test('qq003', only_compiler_types(['ghc']),
+test('qq003', [req_interp, only_compiler_types(['ghc'])],
compile_fail, [''])
diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T
index c0c9cbe769..13ecda5dad 100644
--- a/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T
+++ b/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T
@@ -1,2 +1,2 @@
-test('qq004', only_compiler_types(['ghc']),
+test('qq004', [req_interp, only_compiler_types(['ghc'])],
compile_fail, [''])
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T
index 4b2209bca9..7074c0f75c 100644
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T
+++ b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T
@@ -14,6 +14,6 @@ test('SafeLang07', normal, compile_fail, [''])
test('SafeLang08', normal, compile_fail, [''])
test('SafeLang09', exit_code(1), compile_and_run, [''])
test('SafeLang10', normal, compile_fail, ['--make -trust base'])
-test('SafeLang11', normal, compile_and_run, ['--make -trust base'])
+test('SafeLang11', req_interp, compile_and_run, ['--make -trust base'])
test('SafeLang12', normal, compile_fail, ['--make -trust base'])
diff --git a/testsuite/tests/ghc-regress/th/2014/all.T b/testsuite/tests/ghc-regress/th/2014/all.T
index 13138dff4e..c6792677d9 100644
--- a/testsuite/tests/ghc-regress/th/2014/all.T
+++ b/testsuite/tests/ghc-regress/th/2014/all.T
@@ -1,7 +1,8 @@
setTestOpts(if_compiler_profiled(skip))
test('2014',
- extra_clean(['A.hi-boot','A.hi','A.o','A.o-boot',
- 'B.hi', 'B.o', 'C.hi', 'C.o']),
+ [req_interp,
+ extra_clean(['A.hi-boot','A.hi','A.o','A.o-boot',
+ 'B.hi', 'B.o', 'C.hi', 'C.o'])],
run_command,
['$MAKE -s --no-print-directory 2014'])