> indeed, it seems that our build process always checks for all dependencies, > including > the ones needed for testing etc. We'll see that we fix this.
FYI, the following has just been pushed to stable-2.14 (see git.ganeti.org). commit 9c335ceebcfed327689a1d1f3189e683b8784418 Author: Klaus Aehlig <[email protected]> Date: Tue Aug 11 13:58:07 2015 +0200 Only insist on haskell test dependencies if needed While developers usually run tests and hence need all the infrastructure for it, people who just want to build and use Ganeti usually do not want to run tests. So, while still using cabal to get a consistent set of dependency packages, make the test infra structure optional in the cabal file. The decision on whether to require test dependencies will be made based on whether the haskell tests are configured to be run. Signed-off-by: Klaus Aehlig <[email protected]> Reviewed-by: Petr Pudlak <[email protected]> diff --git a/Makefile.am b/Makefile.am index 9c44e6c..5f7e765 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1351,6 +1351,7 @@ $(HASKELL_PACKAGE_VERSIONS_FILE): Makefile ganeti.cabal \ cabal/CabalDependenciesMacros.hs touch empty-cabal-config $(CABAL) --config-file=empty-cabal-config configure --user \ + -f`test $(HTEST) == yes && echo "htest" || echo "-htest"` \ -f`test $(ENABLE_MOND) == True && echo "mond" || echo "-mond"` \ -f`test $(ENABLE_METADATA) == True && echo "metad" || echo "-metad"` runhaskell $(abs_top_srcdir)/cabal/CabalDependenciesMacros.hs \ diff --git a/cabal/ganeti.template.cabal b/cabal/ganeti.template.cabal index b1b41d1..3813087 100644 --- a/cabal/ganeti.template.cabal +++ b/cabal/ganeti.template.cabal @@ -5,7 +5,7 @@ license: BSD2 license-file: COPYING author: Google Inc. maintainer: [email protected] -copyright: 2006-2014 Google Inc. +copyright: 2006-2015 Google Inc. category: System build-type: Simple extra-source-files: README @@ -25,6 +25,10 @@ flag metad description: enable the ganeti metadata daemon default: True +flag htest + description: enable tests + default: True + library exposed-modules: @@ -69,17 +73,19 @@ library , utf8-string >= 0.3.7 && < 0.4 , zlib >= 0.5.3.3 && < 0.6 - , HUnit >= 1.2.4.2 && < 1.3 - , QuickCheck >= 2.4.2 && < 2.8 - , test-framework >= 0.6 && < 0.9 - , test-framework-hunit >= 0.2.7 && < 0.4 - , test-framework-quickcheck2 >= 0.2.12.1 && < 0.4 - -- Executables: -- , happy -- , hscolour -- , shelltestrunner + if flag(htest) + build-depends: + HUnit >= 1.2.4.2 && < 1.3 + , QuickCheck >= 2.4.2 && < 2.8 + , test-framework >= 0.6 && < 0.9 + , test-framework-hunit >= 0.2.7 && < 0.4 + , test-framework-quickcheck2 >= 0.2.12.1 && < 0.4 + if flag(mond) build-depends: PSQueue >= 1.1 && < 1.2 -- Klaus Aehlig Google Germany GmbH, Dienerstr. 12, 80331 Muenchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
