summaryrefslogtreecommitdiff
path: root/tests/auto/xmlpatternssdk/TestCase.cpp
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@theqtcompany.com>2015-10-09 14:46:41 +0200
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2015-10-26 13:52:19 +0000
commit7367d313378fb548449feda3bb0f437d29f20e8b (patch)
treebb704e52b743946fb94b106d8f8b28ade3a36944 /tests/auto/xmlpatternssdk/TestCase.cpp
parente19bbdf888e1fdf73872fd8b1598a245ad77d459 (diff)
downloadqtxmlpatterns-7367d313378fb548449feda3bb0f437d29f20e8b.tar.gz
Can now specify which tests to skip with an environment variable5.5
e.g. export XMLPATTERNSXQTS_TESTRANGE=42,49 will execute the tests from number 42 to number 49. The tests are numbered sequentially. This will allow us to not having to run through all the tests when testing for a specific testcase. Change-Id: I4c21158a4eada1b48eb809a887216a7160d73220 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests/auto/xmlpatternssdk/TestCase.cpp')
-rw-r--r--tests/auto/xmlpatternssdk/TestCase.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/xmlpatternssdk/TestCase.cpp b/tests/auto/xmlpatternssdk/TestCase.cpp
index 642e84d..9ae86ad 100644
--- a/tests/auto/xmlpatternssdk/TestCase.cpp
+++ b/tests/auto/xmlpatternssdk/TestCase.cpp
@@ -71,6 +71,13 @@ static bool lessThan(const char *a, const char *b)
TestResult::List TestCase::execute(const ExecutionStage stage,
TestSuite *)
{
+ ++TestCase::executions;
+
+ if ((TestCase::executions < TestCase::executeRange.first) || (TestCase::executions > TestCase::executeRange.second)) {
+ qDebug("Skipping test case #%6d", TestCase::executions);
+ return TestResult::List();
+ }
+
const QByteArray nm = name().toAscii();
if(name() == QLatin1String("Constr-cont-document-3"))
@@ -124,7 +131,7 @@ TestResult::List TestCase::execute(const ExecutionStage stage,
}
- qDebug() << "Running test case: " << nm;
+ qDebug("Running test case #%6d: %s", TestCase::executions, nm.constData());
return execute(stage);
Q_ASSERT(false);