Cabal-1.14.0: A framework for packaging Haskell softwareContentsIndex
Distribution.Simple.Test
Portabilityportable
Maintainercabal-devel@haskell.org
Description
This is the entry point into testing a built package. It performs the "./setup test" action. It runs test suites designated in the package description and reports on the results.
Synopsis
test :: PackageDescription -> LocalBuildInfo -> TestFlags -> IO ()
runTests :: [Test] -> IO ()
writeSimpleTestStub :: TestSuite -> FilePath -> IO ()
stubFilePath :: TestSuite -> FilePath
stubName :: TestSuite -> FilePath
data PackageLog = PackageLog {
package :: PackageId
compiler :: CompilerId
platform :: Platform
testSuites :: [TestSuiteLog]
}
data TestSuiteLog = TestSuiteLog {
name :: String
cases :: [Case]
logFile :: FilePath
}
data Case = Case {
caseName :: String
caseOptions :: Options
caseResult :: Result
}
suitePassed :: TestSuiteLog -> Bool
suiteFailed :: TestSuiteLog -> Bool
suiteError :: TestSuiteLog -> Bool
Documentation
test
:: PackageDescriptioninformation from the .cabal file
-> LocalBuildInfoinformation from the configure step
-> TestFlagsflags sent to test
-> IO ()
Perform the "./setup test" action.
runTests :: [Test] -> IO ()
The test runner used in library TestSuite stub executables. Runs a list of Tests. An executable calling this function is meant to be invoked as the child of a Cabal process during ./setup test. A TestSuiteLog, provided by Cabal, is read from the standard input; it supplies the name of the test suite and the location of the machine-readable test suite log file. Human-readable log information is written to the standard output for capture by the calling Cabal process.
writeSimpleTestStub
:: TestSuitelibrary TestSuite for which a stub is being created
-> FilePathpath to directory where stub source should be located
-> IO ()
Write the source file for a library TestSuite stub executable.
stubFilePath :: TestSuite -> FilePath
The filename of the source file for the stub executable associated with a library TestSuite.
stubName :: TestSuite -> FilePath
The name of the stub executable associated with a library TestSuite.
data PackageLog
Logs all test results for a package, broken down first by test suite and then by test case.
Constructors
PackageLog
package :: PackageId
compiler :: CompilerId
platform :: Platform
testSuites :: [TestSuiteLog]
data TestSuiteLog
Logs test suite results, itemized by test case.
Constructors
TestSuiteLog
name :: String
cases :: [Case]
logFile :: FilePath
data Case
Constructors
Case
caseName :: String
caseOptions :: Options
caseResult :: Result
suitePassed :: TestSuiteLog -> Bool
From a TestSuiteLog, determine if the test suite passed.
suiteFailed :: TestSuiteLog -> Bool
From a TestSuiteLog, determine if the test suite failed.
suiteError :: TestSuiteLog -> Bool
From a TestSuiteLog, determine if the test suite encountered errors.
Produced by Haddock version 2.6.1