]> hydra-www.ietfng.org Git - dyna2/commitdiff
Add hpc coverage for self-tests
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Thu, 11 Jul 2013 03:54:18 +0000 (23:54 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Thu, 11 Jul 2013 03:54:18 +0000 (23:54 -0400)
Run with "make test-hpc" and then open dist/selftest-hpc-out/index.html for
your viewing pleasure.

Makefile

index 4048471bcb65c4f9bc30590a73166e93178a299d..c4c2c6d7f7c40a912f87fc099dc82258e402894b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,7 @@ clean:
           examples/*.dyna.d \
           examples/*.hist
        rm -rf test/*/*.out
+       rm -rf *.tix
        rm -f tags TAGS
 veryclean: clean
        rm -rf dist
@@ -101,6 +102,27 @@ profbuild:
                 -outputdir dist/pb \
                 -main-is $(MAINMOD) $(MAINFILE)
 
+.PHONY: test-hpc
+test-hpc:
+       mkdir -p dist/selftest-hpc
+       ghc -O0 -fhpc -isrc -idist/build/autogen --make \
+               -o         dist/selftest-hpc/dyna-selftests     \
+               -outputdir dist/selftest-hpc/dyna-selftests-tmp \
+               -hpcdir dist/selftest-hpc/hpc \
+               -main-is Dyna.Main.TestsDriver Dyna.Main.TestsDriver
+       # Remove any old .tix files
+       # (prevent "module mismatch with .tix/.mix file hash number")
+       rm -rf dyna-selftests.tix
+       # Run from top-level
+       dist/selftest-hpc/dyna-selftests
+       # Then move the mix and tix files out of the way
+       mv dyna-selftests.tix dist/selftest-hpc
+       # And last, generate markup
+       hpc markup \
+               --destdir=dist/selftest-hpc-out \
+               --hpcdir=dist/selftest-hpc/hpc \
+               dist/selftest-hpc/dyna-selftests.tix
+
 .PHONY: tags TAGS
 tags TAGS:
        hasktags -b src