[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-903-g786a5bb
Brad King
brad.king at kitware.com
Fri Oct 23 10:04:47 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 786a5bbd1612a6da3487aae97ae99a88f20ea272 (commit)
via e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9 (commit)
from 36f0c5e076363d2fbc66dc474f977c1ba32f461d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=786a5bbd1612a6da3487aae97ae99a88f20ea272
commit 786a5bbd1612a6da3487aae97ae99a88f20ea272
Merge: 36f0c5e e61973e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 23 10:04:45 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 23 10:04:45 2015 -0400
Merge topic 'fix-test-RUN_SERIAL-failure-regression' into next
e61973e1 CTest: Fix regression in handling of a RUN_SERIAL test that fails
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9
commit e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 23 09:25:25 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Oct 23 09:55:25 2015 -0400
CTest: Fix regression in handling of a RUN_SERIAL test that fails
Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler:
Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code
path for cleaning up after a failed RUN_SERIAL test. This causes an
infinite loop after a RUN_SERIAL test fails. Fix it and add a test.
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 4832186..7c7f5df 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -198,6 +198,10 @@ void cmCTestMultiProcessHandler::UnlockResources(int index)
{
this->LockedResources.erase(*i);
}
+ if (this->Properties[index]->RunSerial)
+ {
+ this->SerialTestRunning = false;
+ }
}
//---------------------------------------------------------
@@ -451,11 +455,6 @@ bool cmCTestMultiProcessHandler::CheckOutput()
this->WriteCheckpoint(test);
this->UnlockResources(test);
this->RunningCount -= GetProcessorsUsed(test);
- if (this->Properties[test]->RunSerial)
- {
- this->SerialTestRunning = false;
- }
-
delete p;
}
return true;
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 00895cc..2bc3693 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -78,6 +78,21 @@ endfunction()
run_LabelCount()
+function(run_SerialFailed)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SerialFailed)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
+add_test(NoSuchCommand no_such_command)
+set_tests_properties(NoSuchCommand PROPERTIES RUN_SERIAL ON)
+add_test(Echo \"${CMAKE_COMMAND}\" -E echo \"EchoTest\")
+")
+
+ run_cmake_command(SerialFailed ${CMAKE_CTEST_COMMAND} -V)
+endfunction()
+run_SerialFailed()
+
function(run_TestLoad name load)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestLoad)
set(RunCMake_TEST_NO_CLEAN 1)
diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt
new file mode 100644
index 0000000..cafe565
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: no_such_command
diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt
new file mode 100644
index 0000000..d7144f7
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt
@@ -0,0 +1,10 @@
+Could not find executable no_such_command
+.*
+2/2 Test #2: Echo ............................. Passed +[0-9.]+ sec
++
+50% tests passed, 1 tests failed out of 2
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests FAILED:
+[ ]+1 - NoSuchCommand \(Not Run\)$
-----------------------------------------------------------------------
Summary of changes:
Source/CTest/cmCTestMultiProcessHandler.cxx | 9 ++++-----
Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 15 +++++++++++++++
...il-fail-ctest-result.txt => SerialFailed-result.txt} | 0
Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt | 1 +
Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt | 10 ++++++++++
5 files changed, 30 insertions(+), 5 deletions(-)
copy Tests/RunCMake/CTestCommandLine/{repeat-until-fail-ctest-result.txt => SerialFailed-result.txt} (100%)
create mode 100644 Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt
create mode 100644 Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list