Hi, this bundle should implement reasonable HPC support in our Cabal-based build system. This comes with a hpc.README update, please follow these instructions. Also, I have an automated report generation running, although it is broken right now -- will fix tomorrow.
Yours, Petr. Thu Jul 30 20:59:51 CEST 2009 Petr Rockai <[email protected]> * Combine the HPC tix files after each test in ShellHarness. This is done when HPCTIXDIR is set, so presumably we are generating coverage report. We need to do this, because otherwise, a full testsuite run produces over a gigabyte of tixfiles, even though the combined tix is less than 200K. Thu Jul 30 20:59:59 CEST 2009 Petr Rockai <[email protected]> * Add a flag for enabling HPC for the darcs library. Thu Jul 30 21:03:04 CEST 2009 Petr Rockai <[email protected]> * Update hpc.README to use Cabal.
New patches: [Combine the HPC tix files after each test in ShellHarness. Petr Rockai <[email protected]>**20090730185951 Ignore-this: 577a6e1614aa8c5ff6f25d9df6f81554 This is done when HPCTIXDIR is set, so presumably we are generating coverage report. We need to do this, because otherwise, a full testsuite run produces over a gigabyte of tixfiles, even though the combined tix is less than 200K. ] hunk ./Distribution/ShellHarness.hs 7 import Prelude hiding( catch ) import System.Directory ( getCurrentDirectory, setPermissions, Permissions(..), getDirectoryContents, - findExecutable, createDirectoryIfMissing ) + findExecutable, createDirectoryIfMissing, + renameFile, removeFile ) import System.Environment ( getEnv, getEnvironment ) import System.Exit ( ExitCode (..) ) import System.FilePath hunk ./Distribution/ShellHarness.hs 13 import System.IO +import System( system ) import System.Process ( ProcessHandle, runInteractiveProcess, waitForProcess, getProcessExitCode ) hunk ./Distribution/ShellHarness.hs 18 import Data.Maybe -import Data.List ( isInfixOf, isPrefixOf, (\\), nubBy ) +import Data.List ( isInfixOf, isPrefixOf, (\\), nubBy, isSuffixOf ) import Control.Concurrent #if __GLASGOW_HASKELL__ >= 610 import Control.OldException hunk ./Distribution/ShellHarness.hs 77 run_helper shell (test:ts) fails env = do putStr $ "Running " ++ test ++ " ..." ++ (replicate (36 - (length test)) ' ') (output,result) <- backtick shell test env - cleanup_dirs + cleanup case result of Skipped -> do putStrLn " skipped." run_helper shell ts fails env hunk ./Distribution/ShellHarness.hs 86 Failed -> do putStrLn " failed." putStrLn $ "Probable reason :" ++ output run_helper shell ts (fails++[test]) env - where cleanup_dirs :: IO () - cleanup_dirs = + where cleanup :: IO () + cleanup = do dirfiles <- getDirectoryContents (fromJust $ lookup "TESTS_WD" env) let tempfiles = (filter ("temp" `isPrefixOf`) dirfiles) ++ (filter ("tmp" `isPrefixOf`) dirfiles) hunk ./Distribution/ShellHarness.hs 91 + when (isJust $ lookup "HPCTIXDIR" env) $ do + let tixdir = fromJust $ lookup "HPCTIXDIR" env + tixlist <- getDirectoryContents tixdir + oldsum <- if ("sum.tix" `elem` tixlist) + then do renameFile (tixdir </> "sum.tix") + (tixdir </> "oldsum.tix") + return [tixdir </> "oldsum.tix"] + else return [] + let tixfiles = oldsum ++ [ tixdir </> f | f <- tixlist + , "darcs-" `isPrefixOf` f + , ".tix" `isSuffixOf` f ] + system $ "hpc sum --union --output=" ++ tixdir </> "sum.tix" ++ " " ++ unwords tixfiles + forM tixfiles $ \f -> removeFile f + return () mapM_ (\x-> setPermissions x (Permissions {readable = True [Add a flag for enabling HPC for the darcs library. Petr Rockai <[email protected]>**20090730185959 Ignore-this: e0246133e84e8547e223f61b67a28066 ] hunk ./darcs.cabal 103 description: Compile unit tests (requires QuickCheck >= 2.1.0.0). default: False +flag hpc + default: False + Executable witnesses main-is: witnesses.hs hs-source-dirs: src hunk ./darcs.cabal 323 ghc-options: -Wall -O2 -funbox-strict-fields ghc-prof-options: -prof -auto-all + if flag(hpc) + ghc-prof-options: -fhpc + if flag(curl) extra-libraries: curl includes: curl/curl.h hunk ./darcs.cabal 402 ghc-options: -Wall -O2 -funbox-strict-fields -threaded ghc-prof-options: -prof -auto-all + if flag(hpc) + ghc-prof-options: -fhpc + cc-options: -D_REENTRANT if os(windows) [Update hpc.README to use Cabal. Petr Rockai <[email protected]>**20090730190304 Ignore-this: 7f63751a7daa418ffdca2ca6d20af1b1 ] hunk ./hpc.README 6 # To use hpc (Haskell Program Coverage) with darcs you need at least # ghc 6.8.3. -# You can build darcs with hpc support using --enable-hpc +# You can build darcs with hpc support using: +# cabal configure -fhpc --enable-executable-profiling # Then create a directory and set it as HPCTIXDIR. # Note that simply building darcs will begin populating hunk ./hpc.README 14 # this directory before you ever run any tests. # Therefore, clean the directory after building. -mkdir -p hpctixdir +set -e + export HPCTIXDIR=${PWD}/hpctixdir hunk ./hpc.README 17 +mkdir -p $HPCTIXDIR hunk ./hpc.README 19 -rm -rf ./.hpc +cabal configure -fhpc --enable-executable-profiling +cabal build hunk ./hpc.README 22 -make clean && -./configure --enable-hpc && -make darcs && -#make unit && -rm -f hpctixdir/*.tix || exit 1 +rm -f $HPCTIXDIR/*.tix echo "hpc.README: running tests." hunk ./hpc.README 25 -make test_network -#make test_unit -make test_shell_hashed -make test_shell -make test_shell_format2 -make test_perl -make test_perl_hashed -make test_perl_format2 -make bugs_shell_hashed -make bugs_shell -make bugs_shell_format2 -make bugs_perl -make bugs_perl_hashed -make bugs_perl_format2 +cabal test +cabal test network hunk ./hpc.README 28 -echo "hpc.README: summing results." -hpc sum --union --exclude=Main --exclude=Context --exclude=Autoconf --exclude=Workaround hpctixdir/*.tix > darcs-hpc-summed.tix && - -mkdir -p darcs-hpc && +# The shell harness combines the tixfiles automatically into a sum.tix in +# HPCTIXDIR. hunk ./hpc.README 31 -echo "hpc.README: generating report." && -hpc markup darcs-hpc-summed.tix --destdir=darcs-hpc +mkdir -p dist/hpc +echo "hpc.README: generating report." +hpc markup $HPCTIXDIR/sum.tix --destdir=dist/hpc Context: [Fix link to autoconf tarball. Eric Kow <[email protected]>**20090723135420 Ignore-this: cfe87256fbd5af286a00fbb84ca443d0 ] [Update web page for 2.3.0 release. Eric Kow <[email protected]>**20090723134705 Ignore-this: dfa04b99e5c0170448d635bf0e496a66 ] [Resolve conflict between autoconf removal and version number updates. Eric Kow <[email protected]>**20090723133543 Ignore-this: efcf724bf0230243cee1e88502428ccd ] [Makefile: fix dependency on no longer existing distclean target. Eric Kow <[email protected]>**20090722093438 Ignore-this: d0f8da797e26b0c42a2da76eddd4ed31 ] [Add support for skipping tests (exit 200). Petr Rockai <[email protected]>**20090720095346 Ignore-this: 133cb02e8cca03a4678068450cb150a9 ] [Remove the --checkpoint option from the UI. Petr Rockai <[email protected]>**20090720093634 Ignore-this: 2fb627cd1e64bbe264fda6e19f0b085b ] [Remove the support for writing out new checkpoints. Petr Rockai <[email protected]>**20090720091809 Ignore-this: 87eb23fe7604ed0abe5c38daafb87a7e ] [Remove ununsed test/shell_harness.hs. Eric Kow <[email protected]>**20090721192027 Ignore-this: 7efbe97744c698beecd4f17a09868467 ] [Remove unused determine_release_state.pl. Eric Kow <[email protected]>**20090721205227 Ignore-this: 15331bbb258fbdeb6bd4887c8dabb8ed ] [Require haskell zlib, dropping the legacy internal zlib binding. Petr Rockai <[email protected]>**20090722091325 Ignore-this: 348c1fd005fe19900e4a9706567b4ee0 ] [Make utf8-string mandatory. Eric Kow <[email protected]>**20090721194433 Ignore-this: cd8a94b3e4e41bb938e82dffbcb27e2d ] [Remove UTF8 module completely. Eric Kow <[email protected]>**20090721194220 Ignore-this: f4ec3fe853ecbc928a8d3e3c3b9aa07c The utf8-string package has been the default for a while. Now we're wholly dependent on it. ] [Remove autoconf support and cut GNUmakefile to only build manual and tags. Petr Rockai <[email protected]>**20090717160355 Ignore-this: 8a45c095c566172076adbe6e44b37827 ] [Note darcs 2.3 pre-release and darcs 2.2 stable versions in website. Eric Kow <[email protected]>**20090716133323 Ignore-this: bbe9c36213a07890816b8599f2f29aee ] [Remove website automation from Makefile. Eric Kow <[email protected]>**20090716133230 Ignore-this: f0cdb9afaa9d314321b345a08e2784bf ] [Rename index.html.in to index.html, forgoing website automation. Eric Kow <[email protected]>**20090716133023 Ignore-this: a4c62db2d3ca341e95262cd05328473f The website automation allowed us to avoid duplication of information (ie. version numbers), but we're in the process of changing our build and release system, which breaks the site. For now, we go for simplicity and robustness, perhaps restoring the automation in the future when things have settled down somewhat. ] [Remove bytestring flag from darcs.cabal. Eric Kow <[email protected]>**20090714165021 Ignore-this: 4325773231f9679054c7d045657bdae0 Now that we're requiring GHC 6.8 or above, we always use the external bytestring package. ] [Slightly refactor the run function in ShellHarness. Petr Rockai <[email protected]>**20090714134205 Ignore-this: 92c7f05b9c4d6973e95706f23ea27dfc ] [Slightly refactor test machinery in Setup.lhs. Petr Rockai <[email protected]>**20090714134119 Ignore-this: 32206a331658d407d9c0fb3b48405db6 ] [Use tee in pending_has_conflicts.sh for easier debugging. Petr Rockai <[email protected]>**20090713180404 Ignore-this: 7b96b7f7df6358ddb0466cfe58803f71 ] [Roll back the getSymbolicLinkStatus workaround, since it constitutes a fd leak. Petr Rockai <[email protected]>**20090710143149 Ignore-this: cd2aa7e13cc902852a7c5d0855d55538 rolling back: Sun Jun 21 17:39:42 CEST 2009 Petr Rockai <[email protected]> * Avoid getSymbolicLinkStatus in mmap implementation, works around GHC 6.8.2 bug. ] [Avoid getSymbolicLinkStatus in mmap implementation, works around GHC 6.8.2 bug. Petr Rockai <[email protected]>**20090621153942 Ignore-this: 91092453d97c87edfc4e46b11e4ae208 ] [Move email unit tests to Darcs.Test module space Reinier Lamers <[email protected]>**20090629203409 Ignore-this: 3187d24822e7a125a46e0a273956d792 ] [Teach cabal about new Darcs.Test modules Reinier Lamers <[email protected]>**20090629193208 Ignore-this: c27c8398fd637e100259fdf1f4d42e0a ] [Move unit tests to Darcs.Test module space Reinier Lamers <[email protected]>**20090629192934 Ignore-this: e88d9ecb7ca8f0b5679fba2cd2813ff0 ] [Bound size of trees generated in Darcs.Patch.QuickCheck Reinier Lamers <[email protected]>**20090628134952 Ignore-this: c499b850ad5ca15d4bada56b69ee98f3 This keeps the 'Checking that tree flattenings are consistent' test from occasionally taking hours and hours to complete. The maximum depth of 5 was found by experiment. ] [Add some comments in Darcs.Patch.QuickCheck Reinier Lamers <[email protected]>**20090628134908 Ignore-this: c66a386865832e75427f99febfb91a91 ] [TAG 2.3.0 Petr Rockai <[email protected]>**20090723115125 Ignore-this: e326d4ddff92c578e8fe8a3c23d00193 ] Patch bundle hash: c0e2de1e699c6068ef8d506661c5ceaa0076d5af
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
