From 953be3d3b25baf7e04d11f04284975843fc6c59b Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Tue, 28 Jul 2015 12:29:24 +0200 Subject: CppEditor: Tests: Revive tests depending on loaded projects The tests were broken since the qmake project manager switched to an asynchronous loading. We can't simply check if there are loaded projects because at time the tests are executed there are not any. The user has to set some environment variable in order to make these tests run. Change-Id: I94778578dea5562ee5dad2c565c7b877c18996a7 Reviewed-by: Erik Verbruggen --- src/plugins/cppeditor/cppeditorplugin.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/plugins/cppeditor/cppeditorplugin.h') diff --git a/src/plugins/cppeditor/cppeditorplugin.h b/src/plugins/cppeditor/cppeditorplugin.h index 8745dc9bb4..a4f4304b0c 100644 --- a/src/plugins/cppeditor/cppeditorplugin.h +++ b/src/plugins/cppeditor/cppeditorplugin.h @@ -213,8 +213,17 @@ private slots: void test_includehierarchy_data(); void test_includehierarchy(); - // The following tests depend on the projects that are loaded on startup - // and will be skipped in case no projects are loaded. + // The following tests operate on a project and require special invocation: + // + // Ensure that the project is properly configured for a given settings path: + // $ ./qtcreator -settingspath /your/settings/path /path/to/project + // + // ...and that it builds, which might prevent blocking dialogs for not + // existing files (e.g. ui_*.h). + // + // Run a test: + // $ export QTC_TEST_WAIT_FOR_LOADED_PROJECT=1 + // $ ./qtcreator -settingspath /your/settings/path -test CppEditor,test_openEachFile /path/to/project void test_openEachFile(); void test_switchHeaderSourceOnEachFile(); void test_moveTokenWiseThroughEveryFile(); -- cgit v1.2.1