forked from qt-creator/qt-creator
Tests: Fix race condition when executing plugin tests
Usually the plugin tests are executed after the session manager evaluated the command line arguments. This is just fine for the file and token tests of the CppEditor (fileandtokenactions_test.cpp) since these depend on the files and projects passed in via command line. Running qtcreator within valgrind reverses the sequence and makes it impossible to execute the mentioned tests. Fixed by starting the tests after the plugin initialization is done. Change-Id: I7cc392b7da7e0d98e0ce44edba2e3abceb84fad8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -817,6 +817,10 @@ void PluginManagerPrivate::nextDelayedInitialize()
|
||||
delayedInitializeTimer = 0;
|
||||
profilingSummary();
|
||||
emit q->initializationDone();
|
||||
#ifdef WITH_TESTS
|
||||
if (q->testRunRequested())
|
||||
q->startTests();
|
||||
#endif
|
||||
} else {
|
||||
delayedInitializeTimer->start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user