summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-20 14:36:12 -0800
committerThiago Macieira <thiago.macieira@intel.com>2012-12-29 20:03:12 +0100
commitbe7238aa5372a72553a0ad6fef22bce3e03a8e7c (patch)
treeb556f2765a27331e3784f58c6cb451c8db1db99d /tests
parent0c01e74470a1b467a9814fef979fe77fd3aeb0c4 (diff)
downloadqtchooser-be7238aa5372a72553a0ad6fef22bce3e03a8e7c.tar.gz
qtchooser-be7238aa5372a72553a0ad6fef22bce3e03a8e7c.tar.bz2
qtchooser-be7238aa5372a72553a0ad6fef22bce3e03a8e7c.zip
Remove the test-mode variables
One of the bugs I found during development was in the code handling the XDG data paths, which wasn't exercised during testing. So exercise it instead. Now the test-mode build will be exact the same as the normal code, except that it won't actually run the target executable. Change-Id: I829ed252836b2b581cd61c7dfab9d3061377e8f0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtchooser/testdata/config1/qtchooser/4.8.conf (renamed from tests/auto/qtchooser/testdata/config1/4.8.conf)0
-rw-r--r--tests/auto/qtchooser/testdata/config1/qtchooser/empty.conf (renamed from tests/auto/qtchooser/testdata/config1/empty.conf)0
-rw-r--r--tests/auto/qtchooser/testdata/config2/qtchooser/4.8.conf (renamed from tests/auto/qtchooser/testdata/config2/4.8.conf)0
-rw-r--r--tests/auto/qtchooser/testdata/config2/qtchooser/5.conf (renamed from tests/auto/qtchooser/testdata/config2/5.conf)0
-rw-r--r--tests/auto/qtchooser/testdata/config2/qtchooser/oneline.conf (renamed from tests/auto/qtchooser/testdata/config2/oneline.conf)0
-rw-r--r--tests/auto/qtchooser/testdata/default/qtchooser/default.conf (renamed from tests/auto/qtchooser/testdata/default/default.conf)0
-rw-r--r--tests/auto/qtchooser/tst_qtchooser.cpp6
7 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qtchooser/testdata/config1/4.8.conf b/tests/auto/qtchooser/testdata/config1/qtchooser/4.8.conf
index 54153b7..54153b7 100644
--- a/tests/auto/qtchooser/testdata/config1/4.8.conf
+++ b/tests/auto/qtchooser/testdata/config1/qtchooser/4.8.conf
diff --git a/tests/auto/qtchooser/testdata/config1/empty.conf b/tests/auto/qtchooser/testdata/config1/qtchooser/empty.conf
index 8b13789..8b13789 100644
--- a/tests/auto/qtchooser/testdata/config1/empty.conf
+++ b/tests/auto/qtchooser/testdata/config1/qtchooser/empty.conf
diff --git a/tests/auto/qtchooser/testdata/config2/4.8.conf b/tests/auto/qtchooser/testdata/config2/qtchooser/4.8.conf
index 71d3255..71d3255 100644
--- a/tests/auto/qtchooser/testdata/config2/4.8.conf
+++ b/tests/auto/qtchooser/testdata/config2/qtchooser/4.8.conf
diff --git a/tests/auto/qtchooser/testdata/config2/5.conf b/tests/auto/qtchooser/testdata/config2/qtchooser/5.conf
index dcb18d5..dcb18d5 100644
--- a/tests/auto/qtchooser/testdata/config2/5.conf
+++ b/tests/auto/qtchooser/testdata/config2/qtchooser/5.conf
diff --git a/tests/auto/qtchooser/testdata/config2/oneline.conf b/tests/auto/qtchooser/testdata/config2/qtchooser/oneline.conf
index bdf113b..bdf113b 100644
--- a/tests/auto/qtchooser/testdata/config2/oneline.conf
+++ b/tests/auto/qtchooser/testdata/config2/qtchooser/oneline.conf
diff --git a/tests/auto/qtchooser/testdata/default/default.conf b/tests/auto/qtchooser/testdata/default/qtchooser/default.conf
index 4ad8426..4ad8426 100644
--- a/tests/auto/qtchooser/testdata/default/default.conf
+++ b/tests/auto/qtchooser/testdata/default/qtchooser/default.conf
diff --git a/tests/auto/qtchooser/tst_qtchooser.cpp b/tests/auto/qtchooser/tst_qtchooser.cpp
index 9e5bf93..345ae2c 100644
--- a/tests/auto/qtchooser/tst_qtchooser.cpp
+++ b/tests/auto/qtchooser/tst_qtchooser.cpp
@@ -97,8 +97,8 @@ tst_ToolChooser::tst_ToolChooser()
QString testData = QFINDTESTDATA("testdata");
pathsWithDefault = testData + "/config1" LIST_SEP +
testData + "/config2";
- testModeEnvironment.insert("QTCHOOSER_PATHS", pathsWithDefault);
- testModeEnvironment.insert("QTCHOOSER_TESTMODE", "1");
+ testModeEnvironment.insert("XDG_CONFIG_HOME", "/dev/null");
+ testModeEnvironment.insert("XDG_CONFIG_DIRS", pathsWithDefault);
testModeEnvironment.insert("QT_SELECT", "4.8");
pathsWithDefault.prepend(testData + "/default" LIST_SEP);
@@ -298,7 +298,7 @@ void tst_ToolChooser::defaultQt()
QProcessEnvironment env = testModeEnvironment;
env.remove("QT_SELECT");
if (withDefault)
- env.insert("QTCHOOSER_PATHS", pathsWithDefault);
+ env.insert("XDG_CONFIG_DIRS", pathsWithDefault);
QScopedPointer<QProcess> proc(execute(QStringList() << "-print-qmake", env));
QVERIFY(proc);