2

I use cabal with test-suites. The processor I use (HTF) allows flags (e.g. --quiet). How can I add such flags in the cabal file in order to be passed automatically to the test suite program when it is executed?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
user855443
  • 2,596
  • 3
  • 25
  • 37
  • 1
    TBH: I don't know (if there even is one) - but in this case why don't you make this a default in your implementation (using [`htfMainWithArgs`](https://hackage.haskell.org/package/HTF-0.13.1.0/docs/Test-Framework.html#v:htfMainWithArgs))? - look for the args in your main, if none are there pass your default ... yes it's a hack and maybe someone knows the correct flag but till then it should work for you – Random Dev Apr 12 '16 at 05:11
  • also I think this could be a duplicate of https://stackoverflow.com/questions/28902169/put-command-line-arguments-for-tests-in-cabal-file – Random Dev Apr 12 '16 at 05:12
  • great idea - did work immediately! `htfMainWithArgs ["--quiet"] htf_importedTests` does the trick! – user855443 Apr 16 '16 at 18:01
  • 1
    @Cartsen since your comment provided an answer, care to post it as one? – sclv Apr 28 '16 at 05:15

0 Answers0