Commit e692692d authored by ijones's avatar ijones
Browse files

fixed cascading test case failure. update TODO

parent 45baa6bf
......@@ -108,10 +108,10 @@ assertCmd :: String -- ^Command
assertCmd command comment
= system command >>= assertEqual (command ++ ":" ++ comment) ExitSuccess
tests :: [Test]
tests = [TestLabel "testing the wash2hs package" $ TestCase $
do oldDir <- getCurrentDirectory
setCurrentDirectory "test/wash2hs"
tests :: FilePath -> [Test]
tests currDir
= [TestLabel "testing the wash2hs package" $ TestCase $
do setCurrentDirectory $ pathJoin [currDir, "test", "wash2hs"]
system "make clean"
system "make"
assertCmd "./setup configure --prefix=\",tmp\"" "wash2hs configure"
......@@ -123,10 +123,8 @@ tests = [TestLabel "testing the wash2hs package" $ TestCase $
>>= assertBool "wash2hs didn't put executable into place."
perms <- getPermissions ",tmp/bin/wash2hs"
assertBool "wash2hs isn't +x" (executable perms),
-- setCurrentDirectory oldDir,
TestLabel "testing the HUnit package" $ TestCase $
do oldDir <- getCurrentDirectory
setCurrentDirectory "../HUnit-1.0"
do setCurrentDirectory $ pathJoin [currDir, "test", "HUnit-1.0"]
(pkgConf, pkgConfExists) <- GHC.localPackageConfig
unless pkgConfExists $ writeFile pkgConf "[]\n"
system $ "ghc-pkg --config-file=" ++ pkgConf ++ " -r HUnit"
......@@ -155,13 +153,12 @@ tests = [TestLabel "testing the wash2hs package" $ TestCase $
assertCmd ("ghc -package-conf " ++ pkgConf ++ " -package HUnit HUnitTester.hs -o ./hunitTest") "compile w/ hunit"
assertCmd "./hunitTest" "hunit test"
assertCmd ("ghc-pkg --config-file=" ++ pkgConf ++ " -r HUnit") "package remove",
-- setCurrentDirectory oldDir,
TestLabel "package A: configure GHC, sdist" $ TestCase $
do (pkgConf, pkgConfExists) <- GHC.localPackageConfig
unless pkgConfExists $ writeFile pkgConf "[]\n"
system $ "ghc-pkg -r test --config-file=" ++ pkgConf
setCurrentDirectory "../A"
setCurrentDirectory $ pathJoin [currDir, "test", "A"]
system "make clean"
system "make"
assertCmd "./setup configure --ghc --prefix=,tmp"
......@@ -217,7 +214,8 @@ main = do putStrLn "compile successful"
D.S.S.hunitTests ++ D.S.B.hunitTests ++
D.S.I.hunitTests ++ D.S.simpleHunitTests ++
D.P.hunitTests ++ D.M.hunitTests)
count2 <- runTestTT' $ TestList tests
dir <- getCurrentDirectory
count2 <- runTestTT' $ TestList (tests dir)
putStrLn "-------------"
putStrLn "Test Summary:"
putStrLn $ showCounts $ combineCounts count1 count2
......
......@@ -7,13 +7,11 @@ RC:
** Extensions
- complain if their use makes the code non-portable?
- constructorless data-types
HIGH:
** under what conditions does library == Nothing?
** make sure tests will work on other machines. why doesn't make work
in test/A on lex?
** fix test cases so a single failure doesn't cascade
** Clean up field parsers (Martin: what else goes here?)
*** license parser parses either known strings, or a filename.
LOW
** clean
- does clean remove installed-pkg-config and .setup-config or whatever?
......@@ -23,7 +21,8 @@ LOW
** Change name of Setup.description?
** the ./setup -h output should document which commands exist, and
which options are relevant to which commands.
** refactor createGhcCommandLine?
** add note to doc that we're going to chase dependencies and make the
"modules" field unnecessary in the future.
* 1.0
** HC-PKG (see "Depends on HC-PKG" below)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment