summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/auto/xmlpatterns/tst_xmlpatterns.cpp12
-rw-r--r--tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp13
2 files changed, 17 insertions, 8 deletions
diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
index ebe395a..c1ff307 100644
--- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
+++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
@@ -101,7 +101,7 @@ private:
tst_XmlPatterns::tst_XmlPatterns() : m_generatedTests(0)
, m_normalizeTestName(QLatin1String("[\\*\\?#\\-\\/:; ()',&]"))
, m_filenameInStderr(QLatin1String("file:\\/\\/.*(\\.xq|\\.gccxml|\\.xml|\\.xsl|-)(,|:)"))
- , m_command(QLatin1String("xmlpatterns"))
+ , m_command(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/xmlpatterns"))
, m_dontRun(false)
{
}
@@ -117,9 +117,13 @@ void tst_XmlPatterns::initTestCase()
if(!process.waitForFinished())
{
m_dontRun = true;
- QEXPECT_FAIL("", "The command line tool is not in the path, most likely because Qt "
- "has been partially built, such as only the sub-src rule. No tests will be run.", Abort);
- QVERIFY(false);
+ QSKIP(
+ qPrintable(QString(
+ "The command line tool (%1) could not be run, possibly because Qt was "
+ "incompletely built or installed. No tests will be run."
+ ).arg(m_command)),
+ SkipAll
+ );
}
}
diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
index cb94bcf..29ed77e 100644
--- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
+++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
@@ -41,6 +41,7 @@
#include <QFile>
#include <QtTest/QtTest>
+#include <QLibraryInfo>
#include "../qxmlquery/TestFundament.h"
#include "../network-settings.h"
@@ -70,7 +71,7 @@ private:
};
tst_XmlPatternsValidator::tst_XmlPatternsValidator()
- : m_command(QLatin1String("xmlpatternsvalidator"))
+ : m_command(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/xmlpatternsvalidator"))
, m_dontRun(false)
{
}
@@ -83,9 +84,13 @@ void tst_XmlPatternsValidator::initTestCase()
if(!process.waitForFinished())
{
m_dontRun = true;
- QEXPECT_FAIL("", "The command line tool is not in the path, most likely because Qt "
- "has been partically built, such as only the sub-src rule. No tests will be run.", Abort);
- QVERIFY(false);
+ QSKIP(
+ qPrintable(QString(
+ "The command line tool (%1) could not be run, possibly because Qt was "
+ "incompletely built or installed. No tests will be run."
+ ).arg(m_command)),
+ SkipAll
+ );
}
}