packages feed

Cabal-1.18.1.3: doc/API/Cabal/Distribution-Simple-Test.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Distribution.Simple.Test</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Distribution-Simple-Test.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">Cabal-1.18.1.3: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Maintainer</th><td>cabal-devel@haskell.org</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Distribution.Simple.Test</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This is the entry point into testing a built package. It performs the
 &quot;<code>./setup test</code>&quot; action. It runs test suites designated in the package
 description and reports on the results.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:test">test</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-Setup.html#t:TestFlags">TestFlags</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:stubMain">stubMain</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> [<a href="Distribution-TestSuite.html#t:Test">Test</a>] -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:writeSimpleTestStub">writeSimpleTestStub</a> :: <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:stubFilePath">stubFilePath</a> :: <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:stubName">stubName</a> :: <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:PackageLog">PackageLog</a>  = <a href="#v:PackageLog">PackageLog</a> {<ul class="subs"><li><a href="#v:package">package</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a></li><li><a href="#v:compiler">compiler</a> :: <a href="Distribution-Compiler.html#t:CompilerId">CompilerId</a></li><li><a href="#v:platform">platform</a> :: <a href="Distribution-System.html#t:Platform">Platform</a></li><li><a href="#v:testSuites">testSuites</a> :: [<a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a>]</li></ul>}</li><li class="src short"><span class="keyword">data</span>  <a href="#t:TestSuiteLog">TestSuiteLog</a>  = <a href="#v:TestSuiteLog">TestSuiteLog</a> {<ul class="subs"><li><a href="#v:testSuiteName">testSuiteName</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li><a href="#v:testLogs">testLogs</a> :: <a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a></li><li><a href="#v:logFile">logFile</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></li></ul>}</li><li class="src short"><span class="keyword">data</span>  <a href="#t:TestLogs">TestLogs</a> <ul class="subs"><li>= <a href="#v:TestLog">TestLog</a> { <ul class="subs"><li><a href="#v:testName">testName</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li><a href="#v:testOptionsReturned">testOptionsReturned</a> :: <a href="Distribution-TestSuite.html#t:Options">Options</a></li><li><a href="#v:testResult">testResult</a> :: <a href="Distribution-TestSuite.html#t:Result">Result</a></li></ul> }</li><li>| <a href="#v:GroupLogs">GroupLogs</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> [<a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a>]  </li></ul></li><li class="src short"><a href="#v:suitePassed">suitePassed</a> :: <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:suiteFailed">suiteFailed</a> :: <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:suiteError">suiteError</a> :: <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:test" class="def">test</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></td><td class="doc"><p>information from the .cabal file
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></td><td class="doc"><p>information from the configure step
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-Setup.html#t:TestFlags">TestFlags</a></td><td class="doc"><p>flags sent to test
</p></td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Perform the &quot;<code>./setup test</code>&quot; action.
</p></div></div><div class="top"><p class="src"><a name="v:stubMain" class="def">stubMain</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> [<a href="Distribution-TestSuite.html#t:Test">Test</a>] -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Main function for test stubs. Once, it was written directly into the stub,
 but minimizing the amount of code actually in the stub maximizes the number
 of detectable errors when Cabal is compiled.
</p></div></div><div class="top"><p class="src"><a name="v:writeSimpleTestStub" class="def">writeSimpleTestStub</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a></td><td class="doc"><p>library <code>TestSuite</code> for which a stub
 is being created
</p></td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>path to directory where stub source
 should be located
</p></td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Write the source file for a library <code>TestSuite</code> stub executable.
</p></div></div><div class="top"><p class="src"><a name="v:stubFilePath" class="def">stubFilePath</a> :: <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></p><div class="doc"><p>The filename of the source file for the stub executable associated with a
 library <code>TestSuite</code>.
</p></div></div><div class="top"><p class="src"><a name="v:stubName" class="def">stubName</a> :: <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></p><div class="doc"><p>The name of the stub executable associated with a library <code>TestSuite</code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:PackageLog" class="def">PackageLog</a>  </p><div class="doc"><p>Logs all test results for a package, broken down first by test suite and
 then by test case.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PackageLog" class="def">PackageLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:package" class="def">package</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:compiler" class="def">compiler</a> :: <a href="Distribution-Compiler.html#t:CompilerId">CompilerId</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:platform" class="def">platform</a> :: <a href="Distribution-System.html#t:Platform">Platform</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:testSuites" class="def">testSuites</a> :: [<a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a>]</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:PackageLog" class="caption collapser" onclick="toggleSection('i:PackageLog')">Instances</p><div id="section.i:PackageLog" class="show"><table><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Simple-Test.html#t:PackageLog">PackageLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-Test.html#t:PackageLog">PackageLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-Test.html#t:PackageLog">PackageLog</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:TestSuiteLog" class="def">TestSuiteLog</a>  </p><div class="doc"><p>Logs test suite results, itemized by test case.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TestSuiteLog" class="def">TestSuiteLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:testSuiteName" class="def">testSuiteName</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:testLogs" class="def">testLogs</a> :: <a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:logFile" class="def">logFile</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:TestSuiteLog" class="caption collapser" onclick="toggleSection('i:TestSuiteLog')">Instances</p><div id="section.i:TestSuiteLog" class="show"><table><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:TestLogs" class="def">TestLogs</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TestLog" class="def">TestLog</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:testName" class="def">testName</a> :: <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:testOptionsReturned" class="def">testOptionsReturned</a> :: <a href="Distribution-TestSuite.html#t:Options">Options</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:testResult" class="def">testResult</a> :: <a href="Distribution-TestSuite.html#t:Result">Result</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:GroupLogs" class="def">GroupLogs</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> [<a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:TestLogs" class="caption collapser" onclick="toggleSection('i:TestLogs')">Instances</p><div id="section.i:TestLogs" class="show"><table><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-Test.html#t:TestLogs">TestLogs</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:suitePassed" class="def">suitePassed</a> :: <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>From a <code><a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a></code>, determine if the test suite passed.
</p></div></div><div class="top"><p class="src"><a name="v:suiteFailed" class="def">suiteFailed</a> :: <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>From a <code><a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a></code>, determine if the test suite failed.
</p></div></div><div class="top"><p class="src"><a name="v:suiteError" class="def">suiteError</a> :: <a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>From a <code><a href="Distribution-Simple-Test.html#t:TestSuiteLog">TestSuiteLog</a></code>, determine if the test suite encountered errors.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>