Commit 09f0325e authored by Kyle Edwards's avatar Kyle Edwards
Browse files

CTest: Fix regression in ctest_start()

The format for the TAG file was changed in 3.12, and the way it was
read caused a regression which changed how the track was decided. This
commit fixes the regression.

Fixes #18347.
parent f478fa63
......@@ -478,11 +478,13 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
std::string track;
if (cmSystemTools::GetLineFromStream(tfin, track)) {
if (cmSystemTools::GetLineFromStream(tfin, track) &&
!this->Parts[PartStart] && !command) {
this->SpecificTrack = track;
std::string model;
if (cmSystemTools::GetLineFromStream(tfin, model)) {
if (cmSystemTools::GetLineFromStream(tfin, model) &&
!this->Parts[PartStart] && !command) {
this->TestModel = GetTestModelFromString(model.c_str());
Run dashboard with model Experimental
Source directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack
Build directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-build
Track: ExperimentalDifferent
Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack/CTestConfig.cmake
Site: test-site
Build name: test-build-name
Use ExperimentalDifferent tag: [0-9-]+
......@@ -30,6 +30,7 @@ run_ctest_start(AppendSameModel Continuous APPEND)
run_ctest_start(AppendDifferentModel Experimental APPEND)
run_ctest_start(AppendNoModel APPEND)
run_ctest_start(AppendDifferentTrack TRACK ExperimentalDifferent APPEND)
run_ctest_start(NoAppendDifferentTrack Experimental TRACK ExperimentalDifferent)
run_ctest_start(AppendNoMatchingTrack Continuous APPEND)
run_ctest_start(AppendOldContinuous Continuous APPEND)
run_ctest_start(AppendOldNoModel APPEND)
......@@ -14,7 +14,7 @@ function(setup_tests)
if("@CASE_NAME@" MATCHES "^Append")
if("@CASE_NAME@" MATCHES "^(No)?Append")
if("@CASE_NAME@" MATCHES "^AppendNoMatchingTrack$")
file(WRITE "${CTEST_BINARY_DIRECTORY}/Testing/TAG" "19551112-2204\nSomeWeirdTrackName\n")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment