Commit f07bf19e authored by thomie's avatar thomie
Browse files

Testsuite: fix enum01/02/03 on Windows (#9399)

parent 6a5bce14
......@@ -78,7 +78,7 @@ test('dynamic003', extra_run_opts('+RTS -K32m -RTS'), compile_and_run, ['']
test('dynamic004', omit_ways(['normal', 'threaded1', 'ghci']), compile_and_run, [''])
test('dynamic005', normal, compile_and_run, [''])
enum_setups = [when(fast(), skip), when(opsys('mingw32'), expect_broken(9399))]
enum_setups = [when(fast(), skip)]
test('enum01', enum_setups, compile_and_run, [''])
test('enum02', enum_setups, compile_and_run, [''])
test('enum03', enum_setups, compile_and_run, [''])
......
-- !!! Testing the Prelude's Enum instances.
{-# OPTIONS_GHC -F -pgmF ./enum_processor.py #-}
{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-}
-- The processor is a non-CPP-based equivalent of
-- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) })
-- which is not portable to clang
......
-- !!! Testing the Int Enum instances.
{-# OPTIONS_GHC -F -pgmF ./enum_processor.py #-}
{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-}
-- The processor is a non-CPP-based equivalent of
-- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) })
-- which is not portable to clang
......
-- !!! Testing the Word Enum instances.
{-# OPTIONS_GHC -F -pgmF ./enum_processor.py #-}
{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-}
-- The processor is a non-CPP-based equivalent of
-- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) })
-- which is not portable to clang
......
:;# Problem: GHC on Windows doesn't like '-pgmF ./enum_processor.py'.
:;# See ticket:365#comment:7 for details.
:;#
:;# Workaround: this file, which functions both as a Windows .bat script and a
:;# Unix shell script. Hacky, but it seems to work.
:;# Starts with a ':', to skip on Windows.
:; "${PYTHON}" enum_processor.py $@; exit $?
:;# Windows only:
%PYTHON% enum_processor.py %*
#!/usr/bin/env python
# The rough equivalent of the traditional CPP:
# #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) })
# which is not portable to clang.
......
......@@ -251,9 +251,9 @@ extra_src_files = {
'dynbrk004': ['../mdo.hs'],
'dynbrk005': ['TupleN.hs'],
'encoding004': ['encoded-data/'],
'enum01': ['enum_processor.py'],
'enum02': ['enum_processor.py'],
'enum03': ['enum_processor.py'],
'enum01': ['enum_processor.bat', 'enum_processor.py'],
'enum02': ['enum_processor.bat', 'enum_processor.py'],
'enum03': ['enum_processor.bat', 'enum_processor.py'],
'exampleTest': ['AnnotationTuple.hs'],
'fast2haskell': ['Fast2haskell.hs', 'Main.hs'],
'ffi018_ghci': ['ffi018.h'],
......
......@@ -281,7 +281,7 @@ $(TIMEOUT_PROGRAM) :
# communicate with the topmake.
# See Note [Communicating options and variables to a submake]
test: $(TIMEOUT_PROGRAM)
+$(PYTHON) $(RUNTESTS) $(RUNTEST_OPTS) \
+PYTHON="$(PYTHON)" "$(PYTHON)" $(RUNTESTS) $(RUNTEST_OPTS) \
$(patsubst %, --only=%, $(TEST)) \
$(patsubst %, --only=%, $(TESTS)) \
$(patsubst %, --way=%, $(WAY)) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment