honor WORKING_DIRECTORY set on CTest tests
ClosedPublic

Authored by dakon on Jul 12 2017, 5:20 PM.

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.
dakon created this revision.Jul 12 2017, 5:20 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJul 12 2017, 5:20 PM
apol added a subscriber: apol.Jul 12 2017, 5:55 PM

Why are you doing this? What are you trying to fix?

dakon added a comment.Jul 12 2017, 6:56 PM

This is the first step on the way to make the tests aware of their working directory (other patches are finished and will be uploaded soon). It is easier to just pass all things down instead of having expectedFail, workindDir, and who knows what comes in the future all in separate variables down the stack.

dakon updated this revision to Diff 16604.Jul 12 2017, 7:27 PM
  • pass all test properties to CTestSuite
  • CTest: parse the test properties from CTestTestfile.cmake
  • CTest: honor the WORKING_DIRECTORY property of tests
  • CTest: use the test name as name instead of the executable name
dakon retitled this revision from pass all test properties to CTestSuite to honor WORKING_DIRECTORY set on CTest tests.Jul 12 2017, 7:28 PM
kfunk added a subscriber: kfunk.Jul 12 2017, 9:40 PM
In D6656#124630, @dakon wrote:

This is the first step on the way to make the tests aware of their working directory (other patches are finished and will be uploaded soon). It is easier to just pass all things down instead of having expectedFail, workindDir, and who knows what comes in the future all in separate variables down the stack.

In other words, he's (also) trying to fix https://bugs.kde.org/show_bug.cgi?id=349378

apol accepted this revision.Jul 12 2017, 10:02 PM

Cool, thanks!

This revision is now accepted and ready to land.Jul 12 2017, 10:02 PM
kfunk accepted this revision.Jul 12 2017, 10:21 PM

Great work!

projectmanagers/cmake/tests/test_ctestfindsuites.cpp
75

Note: This should probably be turned into a data-driven test in future. Too many branches checking for individual test rows in the body now.

apol added a comment.Jul 12 2017, 10:25 PM

Note: This should probably be turned into a data-driven test in future. Too many branches checking for individual test rows in the body now.

Thought so too. +1

dakon updated this revision to Diff 16619.Jul 13 2017, 4:59 AM

rebased on current master

This revision was automatically updated to reflect the committed changes.
dakon added a comment.Jul 13 2017, 5:05 AM

I second the comment about the data driven test, I was thinking the same. Maybe if I find time...