Fix GDB/LLDB unit tests to use KSharedConfig instead of separate KConfig
ClosedPublic

Authored by kossebau on Jul 25 2018, 11:59 AM.

Details

Summary

Avoids issues with sync'ing from file-system between the different
working memory config instances

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Jul 25 2018, 11:59 AM
Restricted Application added a project: KDevelop. · View Herald TranscriptJul 25 2018, 11:59 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
kossebau requested review of this revision.Jul 25 2018, 11:59 AM
kossebau added a comment.EditedJul 25 2018, 12:14 PM

Should help with running tests on CI where some config dara set via the separate KConfig object seems to not arrive in the KSharedConfig instance in time, making tests fail due to missing data.

Example: GdbTest::testEnvironmentSet()
The config data with the test environment profile settings VariableA & VariableB is stored via the config object as returned from TestLaunchConfiguration.
The internal logic to write the environment data to the gdb setup commands uses KSharedConfig::openConfig() to fetch all enviroment profile data (DebugSession::configInferior(...)).
For that to work though, the data would have needed to be sync'ed in time.

Using the global shared config object for the respective config file (here autodetected due to QString() parameters) avoids the sync issues. Having a separate config objects has no own purpose for the tests.

Given I am pretty confident about this fix, and eager to see if this indeed solves the issues CI has with these tests, going to push now already, given availability of reviewers currently not that big,

This revision was not accepted when it landed; it landed in state Needs Review.Jul 27 2018, 11:17 AM
This revision was automatically updated to reflect the committed changes.
apol added a subscriber: apol.Jul 27 2018, 1:16 PM

Thanks!