diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-06-29 08:20:48 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-07-26 04:19:44 (GMT) |
commit | df1bd0745ac4dc45d150840f87e32a57829029cb (patch) | |
tree | 9cd0b87b7e4919e910e684cabab41542e5603188 /tests/auto/symbols | |
parent | 773e9812dfa391e27677f27112f4a3e36d471ffd (diff) | |
download | Qt-df1bd0745ac4dc45d150840f87e32a57829029cb.zip Qt-df1bd0745ac4dc45d150840f87e32a57829029cb.tar.gz Qt-df1bd0745ac4dc45d150840f87e32a57829029cb.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
Diffstat (limited to 'tests/auto/symbols')
-rw-r--r-- | tests/auto/symbols/tst_symbols.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp index 00486d2..cf62f7b 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 " |