summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2011-06-29 08:20:48 (GMT)
committerSergio Ahumada <sergio.ahumada@nokia.com>2011-06-29 08:21:01 (GMT)
commitda68cb3ef67f8cb83e568ae94cc8272247c3f548 (patch)
tree5b18a170142292067dd2070e80ab0888acbcf4aa
parentf822f0cc8958c09428fc3be4252d82af92802ca9 (diff)
downloadQt-da68cb3ef67f8cb83e568ae94cc8272247c3f548.zip
Qt-da68cb3ef67f8cb83e568ae94cc8272247c3f548.tar.gz
Qt-da68cb3ef67f8cb83e568ae94cc8272247c3f548.tar.bz2
Adding QTDIR validation in tst_symbols autotest
If the variable QTDIR is not set, you might end up checking all the system libraries symbols. Change-Id: I7b079d7e10fccad962cd3b2ced317eb35840bd71 Reviewed-by: Rohan McGovern
-rw-r--r--tests/auto/symbols/tst_symbols.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp
index d2c8c24..049c771 100644
--- a/tests/auto/symbols/tst_symbols.cpp
+++ b/tests/auto/symbols/tst_symbols.cpp
@@ -55,6 +55,8 @@ class tst_Symbols: public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
+
void prefix();
void globalObjects();
};
@@ -89,6 +91,12 @@ static QString symbolToLine(const QString &symbol, const QString &lib)
return result;
}
+void tst_Symbols::initTestCase()
+{
+ QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR"));
+ QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR");
+}
+
/* This test searches through all Qt libraries and searches for symbols
starting with "global constructors keyed to "