on xenial help sign in
Converge on UNITY_TESTING=1 envvar
commit88119ddabc24bc405602100e86b9fb79e25695e9 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 30 Apr 2015, 00:03 (11 years ago) parent891855f
3 files changed+2−12
plugins/Wizard/PageList.cpp+1−1 tests/plugins/Utils/timeformattertest.cpp−10 tests/plugins/Wizard/CMakeLists.txt+1−1
plugins/Wizard/PageList.cpp+1−1
@@ -45,7 +45,7 @@ PageList::PageList(QObject *parent)
4545 QSet<QString> disabledPages;
4646 QStringList dataDirs;
4747
48− if (!isRunningInstalled() && getenv("UNITY_TEST_ENV") == nullptr) {
48+ if (!isRunningInstalled() && getenv("UNITY_TESTING") == nullptr) {
4949 dataDirs = QStringList() << qmlDirectory();
5050 } else {
5151 dataDirs = shellDataDirs();
tests/plugins/Utils/timeformattertest.cpp−10
@@ -45,16 +45,6 @@ private:
4545 }
4646
4747private Q_SLOTS:
48− void initTestCase()
49− {
50− setenv("UNITY_TEST_ENV", "1", 1);
51− }
52−
53− void cleanupTestCase()
54− {
55− unsetenv("UNITY_TEST_ENV");
56− }
57−
5848 void testTimeFormatter_Format_data() { addTestData(QList<int>() << 0); }
5949 void testTimeFormatter_Format()
6050 {
tests/plugins/Wizard/CMakeLists.txt+1−1
@@ -8,7 +8,7 @@ add_executable(tst-wizard-pagelist
88 ${CMAKE_SOURCE_DIR}/plugins/Wizard/PageList.cpp
99)
1010qt5_use_modules(tst-wizard-pagelist Core Qml Test)
11−add_test(NAME wizardpagelisttest COMMAND env UNITY_TEST_ENV=1 ${CMAKE_CURRENT_BINARY_DIR}/tst-wizard-pagelist)
11+add_test(NAME wizardpagelisttest COMMAND env UNITY_TESTING=1 ${CMAKE_CURRENT_BINARY_DIR}/tst-wizard-pagelist)
1212
1313add_executable(tst-wizard-system
1414 tst_system.cpp