summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-12-12 16:42:37 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-12 23:25:02 -0500
commit14500dab3e9c24d2701c8be6f5a0fca30531ab80 (patch)
treee6ce4d3ad30511df4da006ae4cda4c1f3ad435d7
parent250058891a52cb790bc53ab7cf947a8fb2837466 (diff)
downloadhaskell-14500dab3e9c24d2701c8be6f5a0fca30531ab80.tar.gz
testsuite: Fix a number of GHCi-related failures due to integer-simple
Towards fixing #16043.
-rw-r--r--testsuite/driver/testlib.py5
-rw-r--r--testsuite/mk/test.mk2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/all.T53
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T4
-rw-r--r--testsuite/tests/lib/integer/all.T4
5 files changed, 38 insertions, 30 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 94211df730..dca6ed17e8 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -213,6 +213,11 @@ def record_broken(name, opts, bug):
if not me in brokens:
brokens.append(me)
+def broken_without_gmp(name, opts):
+ # Many tests sadly break with integer-simple due to GHCi's ignorance of it.
+ when(config.integer_backend != "integer-gimp",
+ expect_broken(16043))
+
def _expect_pass(way):
# Helper function. Not intended for use in .T files.
opts = getTestOpts()
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 4b1b4d7978..1bac4fd091 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -240,6 +240,8 @@ else
RUNTEST_OPTS += -e config.local=True
endif
+RUNTEST_OPTS += -e 'config.integer_backend="$(INTEGER_LIBRARY)"'
+
RUNTEST_OPTS += \
--rootdir=. \
--config-file=$(CONFIG) \
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index 156f8e13db..1ecf08f244 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -2,22 +2,23 @@ setTestOpts([extra_run_opts('-ignore-dot-ghci'),
when(config.have_ext_interp, extra_ways(['ghci-ext'])), # test with -fexternal-interpreter
normalise_slashes])
-test('print001', normal, ghci_script, ['print001.script'])
-test('print002', extra_files(['../Test.hs']), ghci_script, ['print002.script'])
-test('print003', extra_files(['../Test.hs']), ghci_script, ['print003.script'])
-test('print004', normal, ghci_script, ['print004.script'])
-test('print005', extra_files(['../QSort.hs']), ghci_script, ['print005.script'])
-test('print006', extra_files(['../Test.hs']), ghci_script, ['print006.script'])
+
+test('print001', broken_without_gmp, ghci_script, ['print001.script'])
+test('print002', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print002.script'])
+test('print003', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print003.script'])
+test('print004', broken_without_gmp, ghci_script, ['print004.script'])
+test('print005', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['print005.script'])
+test('print006', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print006.script'])
test('print007', extra_files(['../Test.hs']), ghci_script, ['print007.script'])
-test('print008', extra_files(['../Test.hs']), ghci_script, ['print008.script'])
+test('print008', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print008.script'])
test('print009', normal, ghci_script, ['print009.script'])
-test('print010', extra_files(['../Test.hs']), ghci_script, ['print010.script'])
+test('print010', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print010.script'])
test('print011', extra_files(['../Test.hs']), ghci_script, ['print011.script'])
-test('print012', extra_files(['../GADT.hs', '../Test.hs']), ghci_script, ['print012.script'])
-test('print013', extra_files(['../GADT.hs']), ghci_script, ['print013.script'])
-test('print014', extra_files(['../GADT.hs']), ghci_script, ['print014.script'])
-test('print016', extra_files(['../Test.hs']), ghci_script, ['print016.script'])
-test('print017', extra_files(['../Test.hs']), ghci_script, ['print017.script'])
+test('print012', [broken_without_gmp, extra_files(['../GADT.hs', '../Test.hs'])], ghci_script, ['print012.script'])
+test('print013', [broken_without_gmp, extra_files(['../GADT.hs'])], ghci_script, ['print013.script'])
+test('print014', [broken_without_gmp, extra_files(['../GADT.hs'])], ghci_script, ['print014.script'])
+test('print016', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print016.script'])
+test('print017', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print017.script'])
test('print018', extra_files(['../Test.hs']), ghci_script, ['print018.script'])
test('print019', extra_files(['../Test.hs']), ghci_script, ['print019.script'])
@@ -30,12 +31,12 @@ test('print021', normal, ghci_script, ['print021.script'])
test('print022',
[when(arch('powerpc64'), expect_broken(14455))],
ghci_script, ['print022.script'])
-test('print023', extra_files(['../Test.hs']), ghci_script, ['print023.script'])
-test('print024', extra_files(['../Test.hs']), ghci_script, ['print024.script'])
+test('print023', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print023.script'])
+test('print024', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print024.script'])
test('print025', normal, ghci_script, ['print025.script'])
test('print026', normal, ghci_script, ['print026.script'])
test('print027', normal, ghci_script, ['print027.script'])
-test('print028', normal, ghci_script, ['print028.script'])
+test('print028', broken_without_gmp, ghci_script, ['print028.script'])
test('print029', normal, ghci_script, ['print029.script'])
test('print030', extra_files(['print029.hs']), ghci_script, ['print030.script'])
test('print031', normal, ghci_script, ['print031.script'])
@@ -45,12 +46,12 @@ test('print034', extra_files(['../GADT.hs', '../Test.hs']), ghci_script, ['print
test('print035', extra_files(['../Unboxed.hs']), ghci_script, ['print035.script'])
test('print036', expect_broken(9046), ghci_script, ['print036.script'])
-test('break001', extra_files(['../Test2.hs']), ghci_script, ['break001.script'])
+test('break001', [broken_without_gmp, extra_files(['../Test2.hs'])], ghci_script, ['break001.script'])
test('break002', extra_files(['../Test2.hs']), ghci_script, ['break002.script'])
test('break003', extra_files(['../Test3.hs']), ghci_script, ['break003.script'])
-test('break005', extra_files(['../QSort.hs']), ghci_script, ['break005.script'])
-test('break006', extra_files(['../Test3.hs']), ghci_script, ['break006.script'])
-test('break007', [extra_files(['Break007.hs'])], ghci_script, ['break007.script'])
+test('break005', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['break005.script'])
+test('break006', [broken_without_gmp, extra_files(['../Test3.hs'])], ghci_script, ['break006.script'])
+test('break007', extra_files(['Break007.hs']), ghci_script, ['break007.script'])
test('break008', extra_files(['../Test3.hs']), ghci_script, ['break008.script'])
test('break009', [extra_files(['../Test6.hs']),
combined_output], ghci_script, ['break009.script'])
@@ -72,12 +73,12 @@ test('break020', extra_files(['Break020b.hs']), ghci_script, ['break020.script']
test('break021', extra_files(['Break020b.hs', 'break020.hs']), ghci_script, ['break021.script'])
test('break024', combined_output, ghci_script, ['break024.script'])
test('break025', normal, ghci_script, ['break025.script'])
-test('break026', normal, ghci_script, ['break026.script'])
-test('break027', extra_files(['../QSort.hs']), ghci_script, ['break027.script'])
+test('break026', broken_without_gmp, ghci_script, ['break026.script'])
+test('break027', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['break027.script'])
test('break028', normal, ghci_script, ['break028.script'])
test('dynbrk001', extra_files(['../QSort.hs']), ghci_script, ['dynbrk001.script'])
-test('dynbrk002', extra_files(['../QSort.hs']), ghci_script, ['dynbrk002.script'])
+test('dynbrk002', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['dynbrk002.script'])
test('dynbrk003', normal, ghci_script, ['dynbrk003.script'])
test('dynbrk004', extra_files(['../mdo.hs']), ghci_script, ['dynbrk004.script'])
test('dynbrk005', [extra_files(['TupleN.hs']), expect_broken(1530)],
@@ -92,12 +93,12 @@ test('listCommand001', [extra_files(['../Test3.hs']),
combined_output], ghci_script, ['listCommand001.script'])
test('listCommand002', normal, ghci_script, ['listCommand002.script'])
-test('hist001', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
+test('hist001', [broken_without_gmp, extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
ghci_script, ['hist001.script'])
-test('hist002', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
+test('hist002', [broken_without_gmp, extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
ghci_script, ['hist002.script'])
-test('T2740', normal, ghci_script, ['T2740.script'])
+test('T2740', broken_without_gmp, ghci_script, ['T2740.script'])
test('getargs', extra_files(['../getargs.hs']), ghci_script, ['getargs.script'])
test('T7386', normal, ghci_script, ['T7386.script'])
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 0dc0e5bc76..c58f5872cf 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -91,7 +91,7 @@ test('ghci051', normal, ghci_script, ['ghci051.script'])
test('ghci052', normal, ghci_script, ['ghci052.script'])
test('ghci053', normal, ghci_script, ['ghci053.script'])
test('ghci054', normal, ghci_script, ['ghci054.script'])
-test('ghci055', combined_output, ghci_script, ['ghci055.script'])
+test('ghci055', [broken_without_gmp, combined_output], ghci_script, ['ghci055.script'])
test('ghci056',
[pre_cmd('$MAKE -s --no-print-directory ghci056_setup'),
@@ -115,7 +115,7 @@ test('T1914', [], ghci_script, ['T1914.script'])
test('T2182ghci', normal, ghci_script, ['T2182ghci.script'])
test('T2182ghci2', [extra_hc_opts("-XNoImplicitPrelude")], ghci_script, ['T2182ghci2.script'])
-test('T2976', normal, ghci_script, ['T2976.script'])
+test('T2976', broken_without_gmp, ghci_script, ['T2976.script'])
test('T2816', normal, ghci_script, ['T2816.script'])
test('T789', normal, ghci_script, ['T789.script'])
test('T3263', normal, ghci_script, ['T3263.script'])
diff --git a/testsuite/tests/lib/integer/all.T b/testsuite/tests/lib/integer/all.T
index e9b19eb908..aa7371df0a 100644
--- a/testsuite/tests/lib/integer/all.T
+++ b/testsuite/tests/lib/integer/all.T
@@ -2,8 +2,8 @@ test('integerBits', normal, compile_and_run, [''])
test('integerConversions', normal, compile_and_run, [''])
# skip ghci as it doesn't support unboxed tuples
test('integerGmpInternals', [reqlib('integer-gmp'), omit_ways('ghci')], compile_and_run, [''])
-test('plusMinusInteger', [reqlib('integer-gmp'), omit_ways('ghci')], compile_and_run, [''])
-test('integerConstantFolding', [], run_command,
+test('plusMinusInteger', [omit_ways('ghci')], compile_and_run, [''])
+test('integerConstantFolding', broken_without_gmp, run_command,
['$MAKE -s --no-print-directory integerConstantFolding'])
test('fromToInteger', [], run_command,
['$MAKE -s --no-print-directory fromToInteger'])