[Hackage] #787: --test-option should support template argument

#787: --test-option should support template argument ----------------------------------+----------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: Platform: | ----------------------------------+----------------------------------------- The test-framework package can optionally output JUnit XML, an XML flavor understood by many continuous build systems, if you pass it the `--jxml` flag. Using that flag, one can get `cabal test` to output JUnit XML: {{{ cabal configure --enable-tests cabal build cabal test --test-option=--jxml=dist/test/junit.xml }}} However, the `--test-option` flag doesn't allow the user to pass different flags to different test executables so each test executable will override the output of the previous. If the `--test-option` flag took a name template argument, supporting a `$test-suite` placeholder, you could generate one JUnit XML file per test suite: {{{ cabal configure --enable-tests cabal build cabal test --test-option=--jxml=dist/test/$test-suite.xml }}} The detailed test interface might support this in some nicer way, but this is a cheap way to have Cabal cooperate better with other test runners. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/787 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#787: --test-option should support template argument ----------------------------------+----------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: Platform: | ----------------------------------+----------------------------------------- Comment(by tibbe): I've attached a patch that implements the basic functionality. There are a few things we might want to discuss: * Which templates placeholders should we support. I only added `$test- suite`. Supporting all of the placeholders supported by `--log` will require some refactoring as the placeholders are computer after the test has been run, using a file output by the test executable. * Is it OK to use `PathTemplate` for template strings which aren't necessarily paths or should we introduce a new `Template` type? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/787#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#787: --test-option should support template argument ----------------------------------+----------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: Platform: | ----------------------------------+----------------------------------------- Comment(by tibbe): I've attached a new patch that adds support for a fuller range of template placeholders. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/787#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#787: --test-option should support template argument ----------------------------------+----------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: Platform: | ----------------------------------+----------------------------------------- Comment(by ttuegel): Replying to [comment:1 tibbe]:
* Is it OK to use `PathTemplate` for template strings which aren't necessarily paths or should we introduce a new `Template` type?
I took a look at your second patch; it looked fine to me. As far as your question above, I'm not sure why the template system we have needs to be specialized to FilePath; couldn't it be generalized? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/787#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#787: --test-option should support template argument
---------------------------------+------------------------------------------
Reporter: tibbe | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: cabal-install tool | Version: HEAD
Severity: normal | Resolution: fixed
Keywords: | Difficulty: very easy (<1 hour)
Ghcversion: | Platform:
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
Applied.
{{{
Tue Jan 11 07:30:13 GMT 2011 Johan Tibell

#787: --test-option should support template argument ---------------------------------+------------------------------------------ Reporter: tibbe | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: fixed Keywords: | Difficulty: very easy (<1 hour) Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment(by elga): * [http://www.releve-identite-operateur.fr/numbero-de-virgin-mobile.html virgin mobile] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/787#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage