git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: update test suite runner
1a551a1Andy Arvanitis
pcc/TestMain.hs+15−8
@@ -49,7 +49,7 @@ main = do
49
49
50 -- Auto-generate Makefile
50 -- Auto-generate Makefile
51 setCurrentDirectory outputDir
51 setCurrentDirectory outputDir
52− callProcess "../.cabal-sandbox/bin/pcc" []
52+ callProcess "pcc" []
53
53
54 let tests = filter (`notElem` skipped) passingTestCases
54 let tests = filter (`notElem` skipped) passingTestCases
55
55
@@ -62,6 +62,11 @@ main = do
62 putStrLn $ "Compiling test " ++ inputFile ++ " ..."
62 putStrLn $ "Compiling test " ++ inputFile ++ " ..."
63 setCurrentDirectory outputDir
63 setCurrentDirectory outputDir
64 copyFile (passingDir </> inputFile) (srcDir </> inputFile)
64 copyFile (passingDir </> inputFile) (srcDir </> inputFile)
65+
66+ let testCaseDir = passingDir </> (takeWhile (/='.') inputFile)
67+ testCaseDirExists <- doesDirectoryExist testCaseDir
68+ when testCaseDirExists $ callProcess "cp" ["-R", testCaseDir, srcDir]
69+
65 callProcess "make" ["clean"]
70 callProcess "make" ["clean"]
66 callProcess "make" ["debug"]
71 callProcess "make" ["debug"]
67 --
72 --
@@ -70,6 +75,7 @@ main = do
70 callProcess ("output" </> "bin" </> "main") []
75 callProcess ("output" </> "bin" </> "main") []
71
76
72 removeFile (srcDir </> inputFile)
77 removeFile (srcDir </> inputFile)
78+ when testCaseDirExists $ callProcess "rm" ["-rf", srcDir </> (takeWhile (/='.') inputFile)]
73
79
74 -- TODO: support failing test cases
80 -- TODO: support failing test cases
75 --
81 --
@@ -92,12 +98,13 @@ repo = "git://github.com/pure11/"
92packages :: [(String, String)]
98packages :: [(String, String)]
93-------------------------------------------------------------------------------
99-------------------------------------------------------------------------------
94packages =
100packages =
95− [ ("purescript-eff", "")
101+ [ ("purescript-eff", "pure11-0.9")
96− , ("purescript-prelude", "")
102+ , ("purescript-prelude", "pure11-0.9")
97− , ("purescript-assert", "")
103+ , ("purescript-assert", "pure11-0.9")
98− , ("purescript-st", "")
104+ , ("purescript-st", "pure11-0.9")
99− , ("purescript-console", "")
105+ , ("purescript-console", "pure11-0.9")
100− , ("purescript-functions", "")
106+ , ("purescript-functions", "pure11-0.9")
107+ , ("purescript-partial", "pure11-0.9")
101 ]
108 ]
102
109
103-------------------------------------------------------------------------------
110-------------------------------------------------------------------------------
@@ -116,5 +123,5 @@ fetchPackages = do
116skipped :: [String]
123skipped :: [String]
117-------------------------------------------------------------------------------
124-------------------------------------------------------------------------------
118skipped =
125skipped =
119− [ "ExplicitImportReExport.purs" -- OK, test has no main (would pass otherwise)
126+ [ "NumberLiterals.purs" -- unreliable float comparison, test manually
120 ]
127 ]