From 1740181daf0d3b4724f71a0818ea038133610580 Mon Sep 17 00:00:00 2001 From: Ruslan Khafizov Date: Tue, 10 Nov 2020 19:15:57 +0800 Subject: Enable tests --- testsuite/run.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'testsuite/run.hs') diff --git a/testsuite/run.hs b/testsuite/run.hs index 6bf3c8158..7f377af79 100644 --- a/testsuite/run.hs +++ b/testsuite/run.hs @@ -14,7 +14,7 @@ main = ok = length good fail = okexeExtension buildPlatform -gf_lib_path = "dist/build/rgl" +run_gf = readProcess default_gf +default_gf = "gf"<.>exeExtension buildPlatform -- | List files, excluding "." and ".." ls path = filter (`notElem` [".",".."]) `fmap` getDirectoryContents path -- cgit v1.2.3 From f505d88a8e9e664c90acc98a9cf9ec7d68a1f4f4 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Wed, 16 Jun 2021 14:27:19 +0800 Subject: Fix build of test suite on ghc-8.2.2 --- testsuite/run.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'testsuite/run.hs') diff --git a/testsuite/run.hs b/testsuite/run.hs index 7f377af79..ed013ab0f 100644 --- a/testsuite/run.hs +++ b/testsuite/run.hs @@ -1,7 +1,7 @@ import Data.List(partition) import System.IO import Distribution.Simple.BuildPaths(exeExtension) -import Distribution.System ( buildPlatform ) +import Distribution.System ( buildPlatform, OS (Windows), Platform (Platform) ) import System.Process(readProcess) import System.Directory(doesFileExist,getDirectoryContents) import System.FilePath((),(<.>),takeExtension) @@ -73,7 +73,12 @@ main = -- Should consult the Cabal configuration! run_gf = readProcess default_gf -default_gf = "gf"<.>exeExtension buildPlatform +default_gf = "gf"<.>exeExtension + where + -- shadows Distribution.Simple.BuildPaths.exeExtension, which changed type signature in Cabal 2.4 + exeExtension = case buildPlatform of + Platform arch Windows -> "exe" + _ -> "" -- | List files, excluding "." and ".." ls path = filter (`notElem` [".",".."]) `fmap` getDirectoryContents path -- cgit v1.2.3 From 65522a63c3d3aaf8e350db514bf9494e545b1c48 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 17 Jun 2021 16:38:33 +0800 Subject: Testsuite: Add support for expected failures And mark the currently failing tests as expected failures --- testsuite/run.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'testsuite/run.hs') diff --git a/testsuite/run.hs b/testsuite/run.hs index ed013ab0f..4f231368b 100644 --- a/testsuite/run.hs +++ b/testsuite/run.hs @@ -11,7 +11,7 @@ main = do res <- walk "testsuite" let cnt = length res (good,bad) = partition ((=="OK").fst.snd) res - ok = length good + ok = length good + length (filter ((=="FAIL (expected)").fst.snd) bad) fail = okexeExtension -- cgit v1.2.3 From 0a18688788f300a8a305114e69bde84bdaf1ea8e Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 17 Jun 2021 19:24:14 +0800 Subject: Remove gf-lib-path from testsuite Since it no longer depends on RGL and it caused issues in the testsuite --- testsuite/run.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'testsuite/run.hs') diff --git a/testsuite/run.hs b/testsuite/run.hs index 4f231368b..7faf9625e 100644 --- a/testsuite/run.hs +++ b/testsuite/run.hs @@ -55,8 +55,7 @@ main = runTest in_file out_file gold_file = do input <- readFile in_file - rgl_lib_dir <- readFile "DATA_DIR" - writeFile out_file =<< run_gf ["-run","-gf-lib-path=" ++ rgl_lib_dir] input + writeFile out_file =<< run_gf ["-run"] input exists <- doesFileExist gold_file if exists then do out <- compatReadFile out_file -- cgit v1.2.3