Fwd: The --test-option flag and TEMPLATE arguments
Probably of interest to other denizens of cabal-devel... ---------- Forwarded message ---------- From: Johan Tibell <johan.tibell@gmail.com> Date: 10 January 2011 22:40 Subject: The --test-option flag and TEMPLATE arguments To: Duncan Coutts <duncan.coutts@googlemail.com>, Thomas Tuegel <ttuegel@gmail.com> After setting up a Hudson continuous build for the network package I've filed http://hackage.haskell.org/trac/hackage/ticket/787 The feature request is pretty straightforward; allow template placeholders in --test-option. The problem is that the PathTemplate type seems designed for directory paths (no surprise their I guess). If I want to support template placeholders in a flag argument that's not necessarily a path, should I still use it? Aside: I think this feature will give us much bang-for-the-buck. It, together with better HPC support, would allow us to fully integrate building of Cabal package with main stream continuous build systems, such as Hudson. We could even add a Cabal plugin for Hudson that would allow anyone to point Hudson at a repo containing a Cabal package and have it * configure and build the package, * run the tests, * provide detailed test run feedback, * show test coverage, and * build haddocks. We're almost there, have a look at http://johantibell.com:8080/job/network/ Johan
Hi all, I had a look at actually implementing the feature this morning but got stuck on the flag parsing. How do I convert , option [] ["test-option"] ("give extra option to test executables " ++ "(no need to quote options containing spaces)") testOptions (\v flags -> flags { testOptions = v }) (reqArg' "OPT" (\x -> toFlag [x]) (fromFlagOrDefault [])) from Simple/Setup.hs to something that eventually ends up as a [PathTemplate] instead of [String]? Feels like it should be simple but GetOpt defeats me again. Johan
On Tue, Jan 11, 2011 at 7:44 AM, Johan Tibell <johan.tibell@gmail.com> wrote:
Hi all,
I had a look at actually implementing the feature this morning but got stuck on the flag parsing. How do I convert
, option [] ["test-option"] ("give extra option to test executables " ++ "(no need to quote options containing spaces)") testOptions (\v flags -> flags { testOptions = v }) (reqArg' "OPT" (\x -> toFlag [x]) (fromFlagOrDefault []))
from Simple/Setup.hs to something that eventually ends up as a [PathTemplate] instead of [String]? Feels like it should be simple but GetOpt defeats me again.
I worked it out, now I just need to figure out why --test-option='--jxml=dist/test/$test-suite.xml' doesn't work.
participants (2)
-
Duncan Coutts -
Johan Tibell