Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 1.065 kB
import Distribution.Simple
import Distribution.PackageDescription (PackageDescription)
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo, buildDir)
import System.Exit
import Control.Monad
import System.Process
main :: IO ()
main = defaultMainWithHooks (simpleUserHooks { runTests = test })
-- TODO: there should be a better way of doing this.
-- The conformance tests would take too long if interpreted, which is
-- why we use ghc to compile a test executable and then run it.
test :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
test _ _ _ _ =
runCommand runQuickCheckTests >>= waitForProcess >>
runCommand compileConformanceTests >>= waitForProcess >>
runCommand runConformanceTests >>= waitForProcess >> return ()
where
runQuickCheckTests = "./quickcheck +names Text/RDF/RDF4H/TriplesGraph_Test.hs Text/RDF/RDF4H/MGraph_Test.hs"
compileConformanceTests = "ghc -O -fglasgow-exts -odir dist/build -hidir dist/build -o test --make Text/RDF/RDF4H/TurtleParser_ConformanceTest.hs"
runConformanceTests = "./test"
Jump to Line
Something went wrong with that request. Please try again.