Cabal-1.12.0: A framework for packaging Haskell software

Portabilityportable
Maintainercabal-devel@haskell.org

Distribution.Simple.Test

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

Documentation

testSource

Arguments

:: PackageDescription

information from the .cabal file

-> LocalBuildInfo

information from the configure step

-> TestFlags

flags sent to test

-> IO () 

Perform the "./setup test" action.

runTests :: [Test] -> IO ()Source

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.

writeSimpleTestStubSource

Arguments

:: TestSuite

library TestSuite for which a stub is being created

-> FilePath

path to directory where stub source should be located

-> IO () 

Write the source file for a library TestSuite stub executable.

stubFilePath :: TestSuite -> FilePathSource

The filename of the source file for the stub executable associated with a library TestSuite.

stubName :: TestSuite -> FilePathSource

The name of the stub executable associated with a library TestSuite.

data PackageLog Source

Logs all test results for a package, broken down first by test suite and then by test case.

data TestSuiteLog Source

Logs test suite results, itemized by test case.

Constructors

TestSuiteLog 

Fields

name :: String
 
cases :: [Case]
 
logFile :: FilePath
 

data Case Source

Constructors

Case 

Instances

suitePassed :: TestSuiteLog -> BoolSource

From a TestSuiteLog, determine if the test suite passed.

suiteFailed :: TestSuiteLog -> BoolSource

From a TestSuiteLog, determine if the test suite failed.

suiteError :: TestSuiteLog -> BoolSource

From a TestSuiteLog, determine if the test suite encountered errors.