diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/api/api.pro | 2 | ||||
-rw-r--r-- | tests/auto/api/api.qbs | 4 | ||||
-rw-r--r-- | tests/auto/api/tst_api.cpp | 2 | ||||
-rw-r--r-- | tests/auto/api/tst_api.h | 2 |
4 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/api/api.pro b/tests/auto/api/api.pro index 672947144..0adfa22db 100644 --- a/tests/auto/api/api.pro +++ b/tests/auto/api/api.pro @@ -3,4 +3,6 @@ TARGET = tst_api HEADERS = tst_api.h SOURCES = tst_api.cpp +qbs_enable_project_file_updates:DEFINES += QBS_ENABLE_PROJECT_FILE_UPDATES + include(../auto.pri) diff --git a/tests/auto/api/api.qbs b/tests/auto/api/api.qbs index 9d0e2c0b4..df42afc89 100644 --- a/tests/auto/api/api.qbs +++ b/tests/auto/api/api.qbs @@ -3,5 +3,7 @@ import "../autotest.qbs" as AutoTest AutoTest { testName: "api" files: ["tst_api.h", "tst_api.cpp"] - cpp.defines: base.concat(['SRCDIR="' + path + '"']) + cpp.defines: base + .concat(['SRCDIR="' + path + '"']) + .concat(project.enableProjectFileUpdates ? ["QBS_ENABLE_PROJECT_FILE_UPDATES"] : []) } diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp index ef3cf9801..b981ce6f2 100644 --- a/tests/auto/api/tst_api.cpp +++ b/tests/auto/api/tst_api.cpp @@ -177,6 +177,7 @@ qbs::GroupData findGroup(const qbs::ProductData &product, const QString &name) return qbs::GroupData(); } +#ifdef QBS_ENABLE_PROJECT_FILE_UPDATES void TestApi::changeContent() { qbs::SetupProjectParameters setupParams = defaultSetupParameters(); @@ -423,6 +424,7 @@ void TestApi::changeContent() } QVERIFY(job->project().projectData() == projectData); } +#endif // QBS_ENABLE_PROJECT_FILE_UPDATES static qbs::ErrorInfo forceRuleEvaluation(const qbs::Project project) { diff --git a/tests/auto/api/tst_api.h b/tests/auto/api/tst_api.h index 756eb1ed3..473b20c80 100644 --- a/tests/auto/api/tst_api.h +++ b/tests/auto/api/tst_api.h @@ -49,7 +49,9 @@ private slots: void buildGraphLocking(); void buildSingleFile(); +#ifdef QBS_ENABLE_PROJECT_FILE_UPDATES void changeContent(); +#endif void disabledInstallGroup(); void fileTagsFilterOverride(); void infiniteLoopBuilding(); |