Hadrian: ability to run a subset of the testsuite
authorAlp Mestanogullari <alpmestan@gmail.com>
Tue, 11 Dec 2018 18:11:32 +0000 (13:11 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 11 Dec 2018 18:11:33 +0000 (13:11 -0500)
commita5e76a073afc8ffdde274a4cb3d09847f2d35be9
tree6d8ddb41c55240ae285118f18e431b4c34052e72
parent7491cedb20d15a54e905205c51aea72a13ac73aa
Hadrian: ability to run a subset of the testsuite

This was supposed to be working already but didn't work when we
specified several tests with --only. This patch not only fixes this
but also makes it possible to specify a subset of tests to run with the
TEST environment variable, like the make build system. Here are some
examples:

    hadrian/build.sh test --only=plugins01
    hadrian/build.sh test --only="plugins01 plugins02"
    TEST="plugins01 plugins02" hadrian/build.sh test
    TEST=plugins03 hadrian/build.sh test --only="plugins01 plugins02"

When both the TEST environment variable and the --only flag are used,
we simply concatenate the list of tests from both sources and ask the
testsuite driver to run them all.

This patch addresses #16026.

Test Plan: hadrian/build.sh test --only="plugins01 plugins02"

Reviewers: bgamari, snowleopard

Reviewed By: bgamari, snowleopard

Subscribers: rwbarton, carter

GHC Trac Issues: #16026

Differential Revision: https://phabricator.haskell.org/D5431
hadrian/README.md
hadrian/doc/testsuite.md [new file with mode: 0644]
hadrian/src/CommandLine.hs
hadrian/src/Settings/Builders/RunTest.hs