diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/backpack/cabal/T14304/all.T | 3 | ||||
-rw-r--r-- | testsuite/tests/concurrent/should_run/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/linking/dyn/Makefile | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/linking/dyn/T13606.hs | 128 | ||||
-rw-r--r-- | testsuite/tests/ghci/linking/dyn/T13606.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/linking/dyn/Triangle.fx | 10 | ||||
-rw-r--r-- | testsuite/tests/ghci/linking/dyn/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/perf/compiler/all.T | 11 | ||||
-rw-r--r-- | testsuite/tests/perf/haddock/all.T | 7 | ||||
-rw-r--r-- | testsuite/tests/perf/should_run/all.T | 7 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/Makefile | 6 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/T14028Quote.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/rts/T13082/all.T | 19 | ||||
-rw-r--r-- | testsuite/tests/rts/all.T | 4 | ||||
l--------- | testsuite/tests/simplCore/should_compile/T14152a.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 4 |
16 files changed, 54 insertions, 161 deletions
diff --git a/testsuite/tests/backpack/cabal/T14304/all.T b/testsuite/tests/backpack/cabal/T14304/all.T index f25285d0d0..cc121c0388 100644 --- a/testsuite/tests/backpack/cabal/T14304/all.T +++ b/testsuite/tests/backpack/cabal/T14304/all.T @@ -4,6 +4,7 @@ else: cleanup = 'CLEANUP=0' test('T14304', - extra_files(['p', 'indef', 'th', 'Setup.hs']), + [extra_files(['p', 'indef', 'th', 'Setup.hs']), + unless(have_dynamic(), skip)], run_command, ['$MAKE -s --no-print-directory T14304 ' + cleanup]) diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index e7ddf461e4..5b548b745c 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -158,7 +158,7 @@ else: conc023_ways = normal test('conc023', [when(fast(), skip), - reqlib('random'), + reqlib('random'), multi_cpu_race, conc023_ways], compile_and_run, ['']) test('conc024', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghci/linking/dyn/Makefile b/testsuite/tests/ghci/linking/dyn/Makefile index 8a627919eb..d4a65a6603 100644 --- a/testsuite/tests/ghci/linking/dyn/Makefile +++ b/testsuite/tests/ghci/linking/dyn/Makefile @@ -101,7 +101,7 @@ T1407: .PHONY: T13606 T13606: - echo "main" | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -lD3DCompiler T13606.hs + echo ":q" | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -lgcc_s .PHONY: big-obj big-obj: diff --git a/testsuite/tests/ghci/linking/dyn/T13606.hs b/testsuite/tests/ghci/linking/dyn/T13606.hs deleted file mode 100644 index 3bce51a761..0000000000 --- a/testsuite/tests/ghci/linking/dyn/T13606.hs +++ /dev/null @@ -1,128 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE ScopedTypeVariables #-} -module Main (main) where - -import Data.Bits (Bits(..)) -import Data.Int (Int32) -import Data.Word (Word32) -import Foreign.C.String (CString, peekCString, withCString, withCStringLen) -import Foreign.Marshal.Alloc (alloca) -import Foreign.Ptr (Ptr, castPtr, nullPtr) -import Foreign.Storable (Storable(..)) -import System.IO (IOMode(..), hGetContents, withFile) - -#if defined(i386_HOST_ARCH) -# define WINDOWS_CCONV stdcall -#elif defined(x86_64_HOST_ARCH) -# define WINDOWS_CCONV ccall -#else -# error Unknown mingw32 arch -#endif - -foreign import WINDOWS_CCONV "D3DCompile" c_d3dCompile - :: Ptr () -> Word32 -> CString -> - Ptr D3DShaderMacro -> Ptr ID3DInclude -> - CString -> CString -> D3DCompileFlag -> D3DCompileEffectFlag -> - Ptr (Ptr ID3DBlob) -> Ptr (Ptr ID3DBlob) -> IO HRESULT - -maybePoke :: (Storable a) => Maybe a -> (Ptr a -> IO b) -> IO b -maybePoke Nothing proc = proc nullPtr -maybePoke (Just m) proc = alloca $ \ptr -> do - poke ptr m - proc ptr - -maybeWithCString :: Maybe String -> (CString -> IO a) -> IO a -maybeWithCString Nothing proc = proc nullPtr -maybeWithCString (Just m) proc = withCString m proc - -type HRESULT = LONG -data ID3DBlob = ID3DBlob -data ID3DInclude = ID3DInclue -type LONG = Int32 - -data D3DShaderMacro = D3DShaderMacro - { _name :: String - , _definition :: String } - -instance Storable D3DShaderMacro where - sizeOf _ = 8 - alignment _ = 8 - peek ptr = do - n <- peekByteOff ptr 0 - d <- peekByteOff ptr 4 - n' <- peekCString n - d' <- peekCString d - return $ D3DShaderMacro n' d' - poke ptr (D3DShaderMacro n d) = do - withCString n $ \n' -> withCString d $ \d' -> do - pokeByteOff ptr 0 n' - pokeByteOff ptr 4 d' - -type D3DCompileFlag = Word32 -type D3DCompileEffectFlag = Word32 - -d3dCompileEnableStrictness :: D3DCompileFlag -d3dCompileEnableStrictness = shift 1 11 - -d3dCompile - :: String -> Maybe String -> - Maybe D3DShaderMacro -> Ptr ID3DInclude -> - Maybe String -> String -> - [D3DCompileFlag] -> [D3DCompileEffectFlag] -> - IO (Either (HRESULT, Ptr ID3DBlob) (Ptr ID3DBlob)) -d3dCompile source sourceName defines pInclude entryPoint target compileFlags effectFlags = do - withCStringLen source $ \(csource, len) -> withCString target $ \pTarget -> - maybeWithCString sourceName $ \pSourceName -> maybePoke defines $ \pDefines -> - maybeWithCString entryPoint $ \pEntryPoint -> alloca $ \ppCode -> alloca $ \ppErrorMsgs -> do - let sFlag = foldl (.|.) 0 compileFlags - let eFlag = foldl (.|.) 0 effectFlags - putStrLn "Before d3dCompile" - hr <- c_d3dCompile - (castPtr csource) - (fromIntegral len) - pSourceName - pDefines - pInclude - pEntryPoint - pTarget - sFlag - eFlag - ppCode - ppErrorMsgs - putStrLn "After d3dCompile" - if hr < 0 - then do - pErrorMsgs <- peek ppErrorMsgs - return $ Left (hr, pErrorMsgs) - else do - pCode <- peek ppCode - return $ Right pCode - -d3dCompileFromFile - :: String -> Maybe String -> - Maybe D3DShaderMacro -> Ptr ID3DInclude -> - Maybe String -> String -> - [D3DCompileFlag] -> [D3DCompileEffectFlag] -> - IO (Either (HRESULT, Ptr ID3DBlob) (Ptr ID3DBlob)) -d3dCompileFromFile fileName sourceName defines pInclude entryPoint target compileFlags effectFlags = - withFile fileName ReadMode $ \handle -> do - contents <- hGetContents handle - d3dCompile contents sourceName defines pInclude entryPoint target compileFlags effectFlags - -main :: IO () -main = do - _vb <- compileShaderFromFile "Triangle.fx" "VS" "vs_4_0" - return () - -compileShaderFromFile :: String -> String -> String -> IO (Ptr ID3DBlob) -compileShaderFromFile fileName entryPoint shaderModel = do - Right res <- d3dCompileFromFile - fileName - Nothing - Nothing - nullPtr - (Just entryPoint) - shaderModel - [d3dCompileEnableStrictness] - [] - return res diff --git a/testsuite/tests/ghci/linking/dyn/T13606.stdout b/testsuite/tests/ghci/linking/dyn/T13606.stdout deleted file mode 100644 index baf6b87f26..0000000000 --- a/testsuite/tests/ghci/linking/dyn/T13606.stdout +++ /dev/null @@ -1,2 +0,0 @@ -Before d3dCompile -After d3dCompile diff --git a/testsuite/tests/ghci/linking/dyn/Triangle.fx b/testsuite/tests/ghci/linking/dyn/Triangle.fx deleted file mode 100644 index 0cef7a1e0f..0000000000 --- a/testsuite/tests/ghci/linking/dyn/Triangle.fx +++ /dev/null @@ -1,10 +0,0 @@ -float4 VS( float4 Pos : POSITION ) : SV_POSITION -{ - return Pos; -} - -float4 PS( float4 Pos : SV_POSITION ) : SV_Target -{ - return float4( 1.0f, 1.0f, 0.0f, 1.0f ); // Yellow, with Alpha = 1 -} - diff --git a/testsuite/tests/ghci/linking/dyn/all.T b/testsuite/tests/ghci/linking/dyn/all.T index 752dc78392..f8679bcbfe 100644 --- a/testsuite/tests/ghci/linking/dyn/all.T +++ b/testsuite/tests/ghci/linking/dyn/all.T @@ -39,8 +39,8 @@ test('T11072msvc', [extra_files(['A.c', 'T11072.hs', 'libAS.def', 'i686/', 'x86_ unless(doing_ghci, skip), unless(opsys('mingw32'), skip)], run_command, ['$MAKE -s --no-print-directory compile_libAS_impl_msvc']) -test('T13606', [extra_files(['Triangle.fx']), - unless(doing_ghci, skip), unless(opsys('mingw32'), skip)], +test('T13606', [unless(doing_ghci, skip), unless(opsys('mingw32'), skip), + exit_code(0)], run_command, ['$MAKE -s --no-print-directory T13606']) test('big-obj', [extra_files(['big-obj-c.c', 'big-obj.hs']), diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index 390e12644a..b161829546 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -656,9 +656,10 @@ test('T5837', # 2016-04-06: 24199320 (x86/Linux, 64-bit machine) TypeInType # 2017-03-24: 27028956 (x86/Linux, 64-bit machine) - (platform('x86_64-unknown-mingw32'), 59161648, 7), + (platform('x86_64-unknown-mingw32'), 54793816, 7), # 2017-02-19 59161648 (x64/Windows) - Unknown # 2017-04-21 54985248 (x64/Windows) - Unknown + # 2017-12-24 54793816 (x64/Windows) - Unknown (wordsize(64), 52089424, 7)]) # sample: 3926235424 (amd64/Linux, 15/2/2012) @@ -1184,14 +1185,18 @@ test('Naperian', [ reqlib('vector'), only_ways(['optasm']), compiler_stats_num_field('bytes allocated', - [(wordsize(64), 2381935784, 10)]) + [(platform('x86_64-unknown-mingw32'), 54116696, 10), + # 2017-12-24 54116696 (x64/Windows) - Unknown + (wordsize(64), 2381935784, 10)]) ], compile, ['']) test ('T9630', [ compiler_stats_num_field('max_bytes_used', # Note [residency] - [(wordsize(64), 41568168, 15) + [(platform('x86_64-unknown-mingw32'), 39867088, 15), + # 2017-12-24: 34171816 (x64/Windows) + (wordsize(64), 41568168, 15) # initial: 56955240 # 2017-06-07: 41568168 Stop the specialiser generating loopy code ]), diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T index b7e6b215ca..4ecd52edc9 100644 --- a/testsuite/tests/perf/haddock/all.T +++ b/testsuite/tests/perf/haddock/all.T @@ -6,8 +6,9 @@ test('haddock.base', [extra_files(['../../../../libraries/base/dist-install/haddock.t']), unless(in_tree_compiler(), skip), req_haddock ,stats_num_field('bytes allocated', - [(platform('x86_64-unknown-mingw32'), 24286343184, 5) + [(platform('x86_64-unknown-mingw32'), 18733710728, 5) # 2017-02-19 24286343184 (x64/Windows) - Generalize kind of (->) + # 2017-12-24 18733710728 (x64/Windows) - Unknown ,(wordsize(64), 19694554424, 5) # 2012-08-14: 5920822352 (amd64/Linux) @@ -144,7 +145,9 @@ test('haddock.compiler', [extra_files(['../../../../compiler/stage2/haddock.t']), unless(in_tree_compiler(), skip), req_haddock ,stats_num_field('bytes allocated', - [(wordsize(64), 51592019560, 10) + [(platform('x86_64-unknown-mingw32'), 56775301896, 10), + # 2017-12-24: 56775301896 (x64/Windows) + (wordsize(64), 51592019560, 10) # 2012-08-14: 26070600504 (amd64/Linux) # 2012-08-29: 26353100288 (amd64/Linux, new CG) # 2012-09-18: 26882813032 (amd64/Linux) diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T index 9c92cd6dc8..aedb40f842 100644 --- a/testsuite/tests/perf/should_run/all.T +++ b/testsuite/tests/perf/should_run/all.T @@ -108,9 +108,10 @@ test('lazy-bs-alloc', test('T876', [stats_num_field('bytes allocated', - [(platform('x86_64-unknown-mingw32'), 66928, 5), + [(platform('x86_64-unknown-mingw32'), 53472, 5), # 2015-04-03: 71904 (amd64/Windows, unknown cause) # 2016-11-27: 66928 (amd64/Windows, unknown cause) + # 2017-12-24: 53472 (amd64/Windows, unknown cause) (wordsize(64), 58128, 5), # 2013-02-14: 1263712 (x86_64/Linux) @@ -542,7 +543,9 @@ test('DeriveNullTermination', normal, compile_and_run, ['']) test('T13623', [stats_num_field('bytes allocated', - [ (wordsize(64), 50936, 5) ]), + [(platform('x86_64-unknown-mingw32'), 47232, 10), + # 2017-12-24 47232 unknown + (wordsize(64), 50936, 5)]), # 2017-05-02 50936 initial only_ways(['normal'])], compile_and_run, diff --git a/testsuite/tests/quasiquotation/Makefile b/testsuite/tests/quasiquotation/Makefile index ebc91d23e5..76e8a928fb 100644 --- a/testsuite/tests/quasiquotation/Makefile +++ b/testsuite/tests/quasiquotation/Makefile @@ -10,6 +10,6 @@ T4150: -'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T4150.hs T14028: - '$(TEST_HC)' $(TEST_HC_OPTS) T14028Quote.hs - '$(TEST_HC)' $(TEST_HC_OPTS) -c T14028C.c - '$(TEST_HC)' $(TEST_HC_OPTS) -fexternal-interpreter T14028 T14028C.o + '$(TEST_HC)' $(TEST_HC_OPTS) -v0 T14028Quote.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T14028C.c + '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -fexternal-interpreter T14028 T14028C.o diff --git a/testsuite/tests/quasiquotation/T14028Quote.hs b/testsuite/tests/quasiquotation/T14028Quote.hs index 01413ec100..1080e2f0aa 100644 --- a/testsuite/tests/quasiquotation/T14028Quote.hs +++ b/testsuite/tests/quasiquotation/T14028Quote.hs @@ -3,4 +3,7 @@ import Language.Haskell.TH import Language.Haskell.TH.Quote here :: QuasiQuoter -here = QuasiQuoter { quoteExp = litE . stringL } +here = QuasiQuoter { quoteExp = litE . stringL, + quotePat = undefined , + quoteType = undefined, + quoteDec = undefined } diff --git a/testsuite/tests/rts/T13082/all.T b/testsuite/tests/rts/T13082/all.T index f048ce4ddd..9580bc40b8 100644 --- a/testsuite/tests/rts/T13082/all.T +++ b/testsuite/tests/rts/T13082/all.T @@ -1,7 +1,24 @@ +import string +import re + +#-------------------------------------- +# Python normalization functions +#-------------------------------------- + +def normalise_search_dirs (str): + str = re.sub(r"directories searched:\s+.+$", + r"directories searched: (none)", str, flags=re.MULTILINE) + str = re.sub(r"^\s+[A-Za-z]:[\\\/].+$", "", str, flags=re.MULTILINE) + return str + +#-------------------------------------- +# Test functions +#-------------------------------------- test('T13082_good', [extra_files(['foo.c', 'main.hs', 'foo_dll.c']), unless(opsys('mingw32'), skip)], run_command, ['$MAKE -s --no-print-directory T13082_good']) -test('T13082_fail', [extra_files(['main.hs']), unless(opsys('mingw32'), skip)], +test('T13082_fail', [extra_files(['main.hs']), unless(opsys('mingw32'), skip), + normalise_errmsg_fun(normalise_search_dirs)], run_command, ['$MAKE -s --no-print-directory T13082_fail']) diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index 7c5b9c750f..6377bde04f 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -35,7 +35,7 @@ test('derefnull', when(platform('i386-apple-darwin'), [ignore_stderr, exit_code(139)]), when(platform('x86_64-apple-darwin'), [ignore_stderr, exit_code(139)]), when(platform('powerpc-apple-darwin'), [ignore_stderr, exit_code(139)]), - when(opsys('mingw32'), [ignore_stderr, exit_code(127)]), + when(opsys('mingw32'), [ignore_stderr, exit_code(11)]), # since these test are supposed to crash the # profile report will be empty always. # so disable the check for profiling @@ -54,7 +54,7 @@ test('divbyzero', # C programs compiled with gcc exit normally, so do we. when(platform('powerpc64-unknown-linux'), [ignore_stdout, exit_code(0)]), when(platform('powerpc64le-unknown-linux'), [ignore_stdout, exit_code(0)]), - when(opsys('mingw32'), [ignore_stderr, exit_code(127)]), + when(opsys('mingw32'), [ignore_stderr, exit_code(8)]), # The output under OS X is too unstable to readily compare when(platform('i386-apple-darwin'), [ignore_stderr, exit_code(136)]), when(platform('x86_64-apple-darwin'), [ignore_stderr, exit_code(136)]), diff --git a/testsuite/tests/simplCore/should_compile/T14152a.hs b/testsuite/tests/simplCore/should_compile/T14152a.hs deleted file mode 120000 index 07fa556727..0000000000 --- a/testsuite/tests/simplCore/should_compile/T14152a.hs +++ /dev/null @@ -1 +0,0 @@ -T14152.hs
\ No newline at end of file diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 2761a06b3c..e51e8f7db4 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -285,5 +285,7 @@ test('T14140', test('T14272', normal, compile, ['']) test('T14270a', normal, compile, ['']) test('T14152', [ only_ways(['optasm']), check_errmsg(r'dead code') ], compile, ['-ddump-simpl']) -test('T14152a', [ only_ways(['optasm']), check_errmsg(r'dead code') ], compile, ['-fno-exitification -ddump-simpl']) +test('T14152a', [extra_files(['T14152.hs']), pre_cmd('cp T14152.hs T14152a.hs'), + only_ways(['optasm']), check_errmsg(r'dead code') ], + compile, ['-fno-exitification -ddump-simpl']) test('T13990', normal, compile, ['-dcore-lint -O']) |