@@ -19,6 +19,7 @@ import Control.Monad
1919
2020import System.Process
2121import System.FilePath
22+import System.IO
2223import System.Directory
2324
2425-------------------------------------------------------------------------------
@@ -53,6 +54,11 @@ main = do
5354
5455 let tests = filter (`notElem` skipped) passingTestCases
5556
57+ tmp <- getTemporaryDirectory
58+ createDirectoryIfMissing False (tmp </> logpath)
59+ outputFile <- openFile (tmp </> logpath </> logfile) WriteMode
60+ hClose outputFile
61+
5662 -- Run the tests
5763 --
5864 forM_ tests $ \inputFile -> do
@@ -72,7 +78,9 @@ main = do
7278 --
7379 -- Run C++ files
7480 --
75− callProcess ("output" </> "bin" </> "main") []
81+ outputFile <- openFile (tmp </> logpath </> logfile) AppendMode
82+ hPutStrLn outputFile ("\n" ++ inputFile ++ ":")
83+ proc <- runProcess ("output" </> "bin" </> "main") [] Nothing Nothing Nothing (Just outputFile) Nothing
7684
7785 removeFile (srcDir </> inputFile)
7886 when testCaseDirExists $ callProcess "rm" ["-rf", srcDir </> (takeWhile (/='.') inputFile)]
@@ -126,3 +134,9 @@ skipped =
126134 [ "NumberLiterals.purs" -- unreliable float comparison, test manually
127135 , "FunWithFunDeps.purs" -- requires FFI
128136 ]
137+
138+logpath :: FilePath
139+logpath = "purescript-output"
140+
141+logfile :: FilePath
142+logfile = "pcc-tests.out"