[Adding test for fork, check it works andy@galois.com**20070918061415] { adddir ./tests/fork addfile ./tests/fork/Makefile hunk ./tests/fork/Makefile 1 +# This Makefile runs the tests using GHC's testsuite framework. It +# assumes the package is part of a GHC build tree with the testsuite +# installed in ../../../testsuite. + +TOP=../../../../testsuite +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +HPCDIR=$(TOP)/../utils/hpc +HPC = $(HPCDIR)/hpc-std + addfile ./tests/fork/hpc_fork.hs hunk ./tests/fork/hpc_fork.hs 1 +module Main where + +import System.Posix.Process + +main = do + pid1 <- forkProcess $ do print "Hello" + pid2 <- forkProcess $ do print "World" + print () + addfile ./tests/fork/hpc_fork.stdout hunk ./tests/fork/hpc_fork.stdout 1 +() + + + 53% expressions used (7/13) +100% boolean coverage (0/0) + 100% guards (0/0) + 100% 'if' conditions (0/0) + 100% qualifiers (0/0) +100% alternatives used (0/0) +100% local declarations used (0/0) +100% top-level declarations used (1/1) + + +---------- + 53% expressions used (7/13) +100% boolean coverage (0/0) + 100% guards (0/0) + 100% 'if' conditions (0/0) + 100% qualifiers (0/0) +100% alternatives used (0/0) +100% local declarations used (0/0) +100% top-level declarations used (1/1) + + +Writing: Main.hs.html + +
+    1 module Main where
+    2 
+    3 import System.Posix.Process
+    4 
+    5 main = do
+    6   pid1 <- forkProcess $ do print "Hello"
+    7   pid2 <- forkProcess $ do print "World"
+    8   print ()
+    9 
+
+
+ +Writing: hpc_index.html + + + + + + + + +
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main100%1/1
0/0 53%7/13
  Program Coverage Total100%1/1
0/0 53%7/13
+Writing: hpc_index_fun.html + + + + + + + + +
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main100%1/1
0/0 53%7/13
  Program Coverage Total100%1/1
0/0 53%7/13
+Writing: hpc_index_alt.html + + + + + + + + +
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main100%1/1
0/0 53%7/13
  Program Coverage Total100%1/1
0/0 53%7/13
+Writing: hpc_index_exp.html + + + + + + + + +
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main100%1/1
0/0 53%7/13
  Program Coverage Total100%1/1
0/0 53%7/13
+ + addfile ./tests/fork/test.T hunk ./tests/fork/test.T 1 +setTestOpts(compose(only_compiler_types(['ghc']), + compose(omit_ways(['ghci','threaded2']), + skip_if_fast))) + +# Set up the hpc common variable(s). +hpc = config.top + '/../utils/hpc/hpc' + +hpc_args = ['perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + hpc,'-fhpc']; + +test('hpc_fork', normal, compile_and_run_with_prefix, hpc_args) + }