Pandoc: Make it possible to run a subset of tests

Created on 22 Jun 2017  路  5Comments  路  Source: jgm/pandoc

stack test runs all tests and the more features pandoc gets, the more time it is required to run all tests. Is it possible to somehow split tests into test suites that can be run separately?

Most helpful comment

The tests can already be run separately. Just add

--test-arguments "-p markdown"

and you'll only get tests that match the pattern "markdown".
If you use the Makefile, you can do

make test TESTARGS='-p markdown'

Note that this uses the options

--fast --test-arguments='-j4 --hide-successes $(TESTARGS)'

All 5 comments

The tests can already be run separately. Just add

--test-arguments "-p markdown"

and you'll only get tests that match the pattern "markdown".
If you use the Makefile, you can do

make test TESTARGS='-p markdown'

Note that this uses the options

--fast --test-arguments='-j4 --hide-successes $(TESTARGS)'

Thanks. Is it documented somewhere?

INSTALL has instructions for doing this with cabal.
We should add instructions for stack.

+++ Alexander Krotov [Jun 22 17 16:41 ]:

Thanks. Is it documented somewhere?

Maybe we should move the INSTALL.md#running-tests section to CONTRIBUTING.md#tests...?

I agree with @mb21. I was just looking for the information in the tests section of CONTRIBUTING.md and couldn't find it.

Also, even with that flag, it seems like other tests are still being run; I added a traceShow while debugging a single test, but still saw debug output from many other tests. I can provide more details on this if needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgm picture jgm  路  51Comments

graymalkin picture graymalkin  路  54Comments

phyllisstein picture phyllisstein  路  84Comments

elliottslaughter picture elliottslaughter  路  44Comments

jgm picture jgm  路  266Comments