on master help sign in
Clean up after testing
commit2dc78fc9046c8286eef9deac4dcb2d392d958819 authorEvan Czaplicki <info@elm-lang.org> dateFri 16 Aug 2013, 03:26 (13 years ago) parent5e02b74
2 files changed+13−6
Elm.cabal+1−1 tests/Main.hs+12−5
Elm.cabal+1−1
@@ -168,4 +168,4 @@ Test-Suite test-elm
168168 Type: exitcode-stdio-1.0
169169 Hs-Source-Dirs: tests
170170 Main-is: Main.hs
171− build-depends: base, HTF
171+ build-depends: base, directory, HTF
tests/Main.hs+12−5
@@ -1,15 +1,22 @@
11module Main where
22
3−import Test.Framework
3+import System.Directory
4+import System.Exit (exitWith)
5+import System.Environment (getArgs)
6+import Test.Framework.TestManager
47import Test.Framework.BlackBoxTest
58
69main :: IO ()
710main = do
8− tests <- blackBoxTests "tests/good" "dist/build/elm/elm" ".elm" args
9− htfMain tests
11+ args <- getArgs
12+ tests <- blackBoxTests "tests/good" "dist/build/elm/elm" ".elm" bbtArgs
13+ code <- runTestWithArgs args tests
14+ removeDirectoryRecursive "cache"
15+ removeDirectoryRecursive "build"
16+ exitWith code
1017
11−args = defaultBBTArgs { bbtArgs_stdoutDiff = ignoreDiff
12− , bbtArgs_stderrDiff = ignoreDiff }
18+bbtArgs = defaultBBTArgs { bbtArgs_stdoutDiff = ignoreDiff
19+ , bbtArgs_stderrDiff = ignoreDiff }
1320
1421ignoreDiff :: Diff
1522ignoreDiff _ _ = return Nothing