Hi,
I'd like to add --enable-tests by default in ghc.port.mk, unless a
hs-ports has set NO_REGRESS=Yes. However, this will have negative
impact on build times. Not much yet (see below), but as time goes
by, more and more hs-ports may include test-suites, so I better ask
before I just do such a change (proposed diff at the end of this
mail).
We currently have a total of 28 hs-ports which use the test-suite
feature of Cabal. One problem is that one *has* to configure those
ports with --enable-tests or a make regress will *always* fail
(noticed by sthen@ the other day while reviewing the new devel/hs-async
port). The next problem is that --enable-tests causes the test-suites
to be compiled and link during the build stage, not during the
regress stage. So, setting --enable-tests by default in ghc.port.mk
obviously will have an impact at the build time, even if you're not
going to make regress at all.
From those 28 ports, only the 9 ports listed below are buildable
with --enable-tests and without NO_REGRESS=Yes. Building them with
--enable-tests set in ghc.port.mk takes those times (measuring mere
build time, not extract/patch/configure):
1st run: 147.87 real 117.49 user17.80 sys
2nd run: 142.19 real 117.69 user17.72 sys
And building them without --enable-tests set:
1st run: 99.50 real83.72 user11.38 sys
2nd run: 101.19 real85.14 user11.30 sys
devel/hs-aeson, devel/hs-async, devel/hs-base64-bytestring,
devel/hs-concurrent-extra, devel/hs-lifted-base, devel/hs-network,
devel/hs-network-conduit, devel/hs-split, devel/hs-unordered-containers
Most of the remaining ports are failing during configure time,
because --enable-regress causes them to require some dependencies
we don't yet have in the ports tree. For now, they'll just get
NO_REGRESS=Yes:
archivers/hs-zlib-bindings, devel/hs-blaze-builder-conduit,
devel/hs-blaze-textual, devel/hs-conduit, devel/hs-hashable,
devel/hs-monad-par, devel/hs-simple-sendfile, lang/feldspar/language,
lang/hs-syntactic, net/hs-HTTP, security/hs-mwc-random, security/hs-skein,
textproc/hs-blaze-html, textproc/hs-blaze-markup, www/hs-clientsession,
www/hs-http-types, www/hs-warp
Two ports fail during build and need NO_REGRESS=Yes, too:
devel/hs-text, textproc/hs-attoparsec
Should this go in?
Ciao,
Kili
here's the diff that would go in:
Index: lang/ghc/ghc.port.mk
===
RCS file: /cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.26
diff -u -p -r1.26 ghc.port.mk
--- lang/ghc/ghc.port.mk8 Nov 2012 22:21:45 - 1.26
+++ lang/ghc/ghc.port.mk3 Dec 2012 21:26:03 -
@@ -57,6 +57,10 @@ MODGHC_SETUP_CONF_ARGS +=--docdir=\$$da
MODGHC_SETUP_CONF_ARGS += --libsubdir=ghc/\$$pkgid
. endif
+. if !${NO_REGRESS:L:Myes}
+MODGHC_SETUP_CONF_ARGS += --enable-tests
+. endif
+
. if ${MODGHC_BUILD:L:Mhaddock}
BUILD_DEPENDS += devel/haddock \
lang/ghc,-doc
Index: archivers/hs-zlib-bindings/Makefile
===
RCS file: /cvs/ports/archivers/hs-zlib-bindings/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- archivers/hs-zlib-bindings/Makefile 28 Oct 2012 23:24:28 - 1.7
+++ archivers/hs-zlib-bindings/Makefile 3 Dec 2012 21:26:03 -
@@ -19,4 +19,7 @@ MODGHC_BUILD =cabal hackage haddock re
RUN_DEPENDS = archivers/hs-zlib=0.5.2.0,0.6
BUILD_DEPENDS =${RUN_DEPENDS}
+# Missing dependencies (hs-hspec).
+NO_REGRESS = Yes
+
.include bsd.port.mk
Index: devel/hs-async/Makefile
===
RCS file: /cvs/ports/devel/hs-async/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- devel/hs-async/Makefile 2 Dec 2012 20:10:22 - 1.1.1.1
+++ devel/hs-async/Makefile 3 Dec 2012 21:26:03 -
@@ -20,8 +20,4 @@ MODGHC_BUILD =cabal hackage haddock re
BUILD_DEPENDS =${RUN_DEPENDS}
RUN_DEPENDS = devel/hs-stm=2.2,2.5
-# Needs --enable-test, which will probably set by ghc.port.mk soon
-# (when I have some numbers about build times).
-NO_REGRESS = Yes
-
.include bsd.port.mk
Index: devel/hs-blaze-builder-conduit/Makefile
===
RCS file: /cvs/ports/devel/hs-blaze-builder-conduit/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- devel/hs-blaze-builder-conduit/Makefile 28 Oct 2012 23:26:38 -
1.2
+++ devel/hs-blaze-builder-conduit/Makefile 3 Dec 2012 21:26:03 -
@@ -25,4 +25,7 @@ RUN_DEPENDS = devel/hs-blaze-builder=0
devel/hs-text=0.11 \
devel/hs-transformers=0.2.2,0.4
+# Missing dependencies (hs-hspec).
+NO_REGRESS = Yes
+
.include bsd.port.mk