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 user        17.80 sys
2nd run:     142.19 real       117.69 user        17.72 sys

And building them without --enable-tests set:

1st run:      99.50 real        83.72 user        11.38 sys
2nd run:     101.19 real        85.14 user        11.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.mk        8 Nov 2012 22:21:45 -0000       1.26
+++ lang/ghc/ghc.port.mk        3 Dec 2012 21:26:03 -0000
@@ -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 -0000      1.7
+++ archivers/hs-zlib-bindings/Makefile 3 Dec 2012 21:26:03 -0000
@@ -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 -0000       1.1.1.1
+++ devel/hs-async/Makefile     3 Dec 2012 21:26:03 -0000
@@ -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 -0000      
1.2
+++ devel/hs-blaze-builder-conduit/Makefile     3 Dec 2012 21:26:03 -0000
@@ -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>
Index: devel/hs-blaze-textual/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-blaze-textual/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- devel/hs-blaze-textual/Makefile     28 Oct 2012 23:26:38 -0000      1.2
+++ devel/hs-blaze-textual/Makefile     3 Dec 2012 21:26:03 -0000
@@ -21,4 +21,8 @@ RUN_DEPENDS =         devel/hs-blaze-builder>=0
                        devel/hs-vector
 BUILD_DEPENDS =                ${RUN_DEPENDS}
 
+# Missing dependencies (hs-double-conversion,
+# hs-test-framework>=0.3.3<0.5).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: devel/hs-concurrent-extra/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-concurrent-extra/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- devel/hs-concurrent-extra/Makefile  2 Dec 2012 20:46:08 -0000       1.4
+++ devel/hs-concurrent-extra/Makefile  3 Dec 2012 21:26:03 -0000
@@ -20,8 +20,4 @@ RUN_DEPENDS =         devel/hs-base-unicode-sym
                        devel/hs-stm>=2.1.2.1,<2.5 \
                        devel/hs-unbounded-delays
 
-# 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-conduit/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-conduit/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- devel/hs-conduit/Makefile   28 Oct 2012 23:27:05 -0000      1.2
+++ devel/hs-conduit/Makefile   3 Dec 2012 21:26:03 -0000
@@ -28,6 +28,7 @@ RUN_DEPENDS =         devel/hs-lifted-base>=0.1
                        devel/hs-transformers-base>=0.4.1,<0.5 \
                        devel/hs-void>=0.5.5,<0.6
 
-
+# Missing dependencies (hspec>=0.9.1).
+NO_REGRESS =           Yes
 
 .include <bsd.port.mk>
Index: devel/hs-hashable/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-hashable/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- devel/hs-hashable/Makefile  2 Dec 2012 20:39:33 -0000       1.4
+++ devel/hs-hashable/Makefile  3 Dec 2012 21:26:03 -0000
@@ -19,7 +19,7 @@ MODGHC_BUILD =                cabal hackage haddock re
 RUN_DEPENDS =          devel/hs-text>=0.11.0.5,<0.12
 BUILD_DEPENDS =                ${RUN_DEPENDS}
 
-# Missing dependencies
+# Missing dependencies (hs-test-framework>=0.3.3<0.6).
 NO_REGRESS =           Yes
 
 .include <bsd.port.mk>
Index: devel/hs-monad-par/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-monad-par/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- devel/hs-monad-par/Makefile 31 Oct 2012 19:19:40 -0000      1.1.1.1
+++ devel/hs-monad-par/Makefile 3 Dec 2012 21:26:03 -0000
@@ -23,4 +23,7 @@ RUN_DEPENDS =         devel/hs-abstract-deque>=
                        devel/hs-parallel>=3.1 \
                        security/hs-mwc-random>=0.11
 
+# Missing dependencies (hs-test-framework-th).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: devel/hs-simple-sendfile/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-simple-sendfile/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- devel/hs-simple-sendfile/Makefile   28 Oct 2012 23:29:18 -0000      1.3
+++ devel/hs-simple-sendfile/Makefile   3 Dec 2012 21:26:03 -0000
@@ -21,4 +21,7 @@ RUN_DEPENDS +=                devel/hs-conduit>=0.4.1,
                        devel/hs-transformers>=0.2.2,<0.4
 BUILD_DEPENDS +=       ${RUN_DEPENDS}
 
+# Missing dependencies (hs-hspec, hs-hspec-discover, hs-hspec-shouldbe).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: devel/hs-text/Makefile
===================================================================
RCS file: /cvs/ports/devel/hs-text/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- devel/hs-text/Makefile      2 Dec 2012 20:23:55 -0000       1.13
+++ devel/hs-text/Makefile      3 Dec 2012 21:26:03 -0000
@@ -17,4 +17,7 @@ MODULES =             lang/ghc
 
 MODGHC_BUILD =         cabal hackage haddock register
 
+# When built with --enable-tests, building the test suite fails.
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: lang/feldspar/language/Makefile
===================================================================
RCS file: /cvs/ports/lang/feldspar/language/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- lang/feldspar/language/Makefile     31 Oct 2012 19:22:44 -0000      1.4
+++ lang/feldspar/language/Makefile     3 Dec 2012 21:26:03 -0000
@@ -27,4 +27,8 @@ post-install:
        cd ${WRKSRC}/examples/ && umask 022 && \
                pax -rw . ${PREFIX}/share/examples/hs-feldspar-language/
 
+# Missing dependencies (hs-test-framework-golden>=1.1,
+# hs-test-framework-th>=0.2).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: lang/hs-syntactic/Makefile
===================================================================
RCS file: /cvs/ports/lang/hs-syntactic/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- lang/hs-syntactic/Makefile  31 Oct 2012 19:21:14 -0000      1.1.1.1
+++ lang/hs-syntactic/Makefile  3 Dec 2012 21:26:03 -0000
@@ -22,4 +22,8 @@ RUN_DEPENDS =         devel/hs-constraints \
                        devel/hs-transformers>=0.2 \
                        devel/hs-tuple>=0.2
 
+# Missing dependencies (hs-test-framework-golden>=1.1,
+# hs-test-framework-th>=0.2).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: net/hs-HTTP/Makefile
===================================================================
RCS file: /cvs/ports/net/hs-HTTP/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- net/hs-HTTP/Makefile        2 Dec 2012 20:21:43 -0000       1.20
+++ net/hs-HTTP/Makefile        3 Dec 2012 21:26:04 -0000
@@ -24,7 +24,8 @@ RUN_DEPENDS =         devel/hs-mtl>=2.0,<2.2 \
                        devel/hs-parsec
 BUILD_DEPENDS =                ${RUN_DEPENDS}
 
-# Missing dependencies
+# Missing/wrong dependencies (hs-httpd-shed, hs-pureMD5>=2.1<2.2,
+# hs-split>=0.1<0.2).
 NO_REGRESS =           Yes
 
 .include <bsd.port.mk>
Index: security/hs-mwc-random/Makefile
===================================================================
RCS file: /cvs/ports/security/hs-mwc-random/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- security/hs-mwc-random/Makefile     28 Oct 2012 23:30:36 -0000      1.3
+++ security/hs-mwc-random/Makefile     3 Dec 2012 21:26:04 -0000
@@ -20,4 +20,7 @@ RUN_DEPENDS =         devel/hs-primitive \
                        devel/hs-vector>=0.7
 BUILD_DEPENDS =                ${RUN_DEPENDS}
 
+# Missing dependencies (hs-statistics>=0.10.1.0).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: security/hs-skein/Makefile
===================================================================
RCS file: /cvs/ports/security/hs-skein/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- security/hs-skein/Makefile  28 Oct 2012 23:30:36 -0000      1.3
+++ security/hs-skein/Makefile  3 Dec 2012 21:26:04 -0000
@@ -22,4 +22,7 @@ RUN_DEPENDS =         devel/hs-cereal>=0.3,<0.4
 
 BUILD_DEPENDS =                ${RUN_DEPENDS}
 
+# Missing dependencies (hs-hspec>=1.3<1.4).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: textproc/hs-blaze-html/Makefile
===================================================================
RCS file: /cvs/ports/textproc/hs-blaze-html/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- textproc/hs-blaze-html/Makefile     28 Oct 2012 23:31:14 -0000      1.3
+++ textproc/hs-blaze-html/Makefile     3 Dec 2012 21:26:04 -0000
@@ -22,4 +22,7 @@ RUN_DEPENDS =         devel/hs-blaze-builder>=0
 
 BUILD_DEPENDS =        ${RUN_DEPENDS}
 
+# Missing/wrong dependencies (hs-QuickCheck>=2.4<2.5).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: textproc/hs-blaze-markup/Makefile
===================================================================
RCS file: /cvs/ports/textproc/hs-blaze-markup/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- textproc/hs-blaze-markup/Makefile   28 Oct 2012 23:31:14 -0000      1.2
+++ textproc/hs-blaze-markup/Makefile   3 Dec 2012 21:26:04 -0000
@@ -21,4 +21,7 @@ RUN_DEPENDS =         devel/hs-blaze-builder>=0
 
 BUILD_DEPENDS =        ${RUN_DEPENDS}
 
+# Missing dependencies (hs-QuickCheck>=2.4<2.5).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: www/hs-clientsession/Makefile
===================================================================
RCS file: /cvs/ports/www/hs-clientsession/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- www/hs-clientsession/Makefile       2 Dec 2012 20:48:34 -0000       1.6
+++ www/hs-clientsession/Makefile       3 Dec 2012 21:26:04 -0000
@@ -29,7 +29,7 @@ RUN_DEPENDS =         devel/hs-base64-bytestrin
                        security/hs-skein>=0.1,<0.2
 BUILD_DEPENDS =                ${RUN_DEPENDS}
 
-# Missing dependencies
+# Missing dependencies (hs-hspec>=1.2).
 NO_REGRESS =           Yes
 
 .include <bsd.port.mk>
Index: www/hs-http-types/Makefile
===================================================================
RCS file: /cvs/ports/www/hs-http-types/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- www/hs-http-types/Makefile  28 Oct 2012 23:31:33 -0000      1.4
+++ www/hs-http-types/Makefile  3 Dec 2012 21:26:04 -0000
@@ -23,4 +23,7 @@ RUN_DEPENDS =         devel/hs-blaze-builder>=0
                        devel/hs-case-insensitive>=0.2,<0.5 \
                        devel/hs-text>=0.11.0.2,<0.12
 
+# Missing dependencies (hs-hspec>=1.0).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>
Index: www/hs-warp/Makefile
===================================================================
RCS file: /cvs/ports/www/hs-warp/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- www/hs-warp/Makefile        28 Oct 2012 23:31:33 -0000      1.4
+++ www/hs-warp/Makefile        3 Dec 2012 21:26:04 -0000
@@ -34,4 +34,7 @@ RUN_DEPENDS =         devel/hs-blaze-builder>=0
                        www/hs-http-types>=0.6,<0.7 \
                        www/hs-wai>=1.2,<1.3
 
+# Missing dependencies (hs-hspec).
+NO_REGRESS =           Yes
+
 .include <bsd.port.mk>

Reply via email to