mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
qtest: don't run coverage when TESTS is given
This commit is contained in:
parent
72e5c73419
commit
ab01045bcd
@ -144,7 +144,17 @@ Run ``ctest`` to run the test suite. Since the real tests are
|
|||||||
implemented with `qtest <https://qtest.sourceforge.io/>`__, you will
|
implemented with `qtest <https://qtest.sourceforge.io/>`__, you will
|
||||||
want to pass ``--verbose`` to ``cmake`` so you can see the individual
|
want to pass ``--verbose`` to ``cmake`` so you can see the individual
|
||||||
test outputs. Otherwise, you will see a small number of ``ctest``
|
test outputs. Otherwise, you will see a small number of ``ctest``
|
||||||
commands that take a very long to run.
|
commands that take a very long to run. If you want to run only a
|
||||||
|
specific test file in a specific test suite, you can set the ``TESTS``
|
||||||
|
environment variable (used by ``qtest-driver``) and pass the ``-R``
|
||||||
|
parameter to ``ctest``. For example:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
TESTS=qutil ctest --verbose -R libtests
|
||||||
|
|
||||||
|
would run only ``qutil.test`` from the ``libtests`` test suite.
|
||||||
|
|
||||||
|
|
||||||
.. _installation:
|
.. _installation:
|
||||||
|
|
||||||
|
12
run-qtest
12
run-qtest
@ -58,8 +58,16 @@ while (@ARGV)
|
|||||||
{
|
{
|
||||||
# On Windows, a literal glob in quotes is expanded by the
|
# On Windows, a literal glob in quotes is expanded by the
|
||||||
# shell, so we have to handle globs when expanded by the
|
# shell, so we have to handle globs when expanded by the
|
||||||
# shell.
|
# shell by consuming arguments until the next --.
|
||||||
push(@tc, shift(@ARGV));
|
|
||||||
|
my $t = shift(@ARGV);
|
||||||
|
if (exists $ENV{'TESTS'})
|
||||||
|
{
|
||||||
|
# No point enabling coverage if we're intentionally
|
||||||
|
# running only a subset of tests.
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
push(@tc, $t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($arg eq '--env')
|
elsif ($arg eq '--env')
|
||||||
|
Loading…
Reference in New Issue
Block a user