[Replaced the Makefile with an executable stanza in the Cabal file. Nils Anders Danielsson **20100602175220 Ignore-this: a0d8ffc46c32fc8ef6e4b89181724039 ] { hunk ./ChasingBottoms.cabal 128 --- It would be nice if the tests that can be accessed through --- Test.ChasingBottoms.Tests.main could be run automatically using --- Cabal (in a simple way). See make test. +flag build-tests + description: Build the test suite. + default: False + manual: True + +executable ChasingBottomsTestSuite + if !flag(build-tests) + buildable: False + + main-is: Test/ChasingBottoms/Tests.hs + + other-modules: Test.ChasingBottoms.Approx.Tests, + Test.ChasingBottoms.ApproxShow.Tests, + Test.ChasingBottoms.ContinuousFunctions.Tests, + Test.ChasingBottoms.IsBottom.Tests, + Test.ChasingBottoms.IsType.Tests, + Test.ChasingBottoms.Nat.Tests, + Test.ChasingBottoms.SemanticOrd.Tests, + Test.ChasingBottoms.TestUtilities, + Test.ChasingBottoms.TestUtilities.Generators, + Test.ChasingBottoms.TimeOut.Tests + + build-depends: QuickCheck == 2.1.*, + mtl == 1.1.*, + base == 4.*, + containers == 0.3.*, + random == 1.0.*, + syb >= 0.1.0.2 && < 0.2, + array == 0.3.* hunk ./Makefile 1 -# This Makefile is currently only used to run a test suite -# automatically using darcs. - -######################################################################## -# You may need to edit the following variables: - -# Path to GHC 6.8, used to run the tests. -GHC_68 ?= ghc - -# GHC packages necessary for building and testing the library. -PACKAGES = base-3.0.1.0 containers-0.1.0.1 random-1.0.0.0 mtl-1.1.0.0 \ -QuickCheck-1.1.0.0 array-0.1.0.0 - -######################################################################## - -# Runs all tests using GHC 6.8. -compile = $(1) -ignore-dot-ghci -no-recomp -hide-all-packages \ - $(foreach pkg,$(PACKAGES),-package $(pkg)) --make $(2) -testWithCompiler = $(call compile,$(1),Test.ChasingBottoms) && $(call \ -compile,$(1),Test.ChasingBottoms.Tests -main-is \ -Test.ChasingBottoms.Tests.main -o tests) && ./tests -.PHONY : test -test: - $(call testWithCompiler,$(GHC_68)) rmfile ./Makefile hunk ./Test/ChasingBottoms/Tests.hs 5 -module Test.ChasingBottoms.Tests (main) where +module Main (main) where }