mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 03:59:58 +00:00
CTest: Weight reported test times by PROCESSORS in summaries
This commit changes the times reported by labels and subprojects to be weighted by the PROCESSORS property. It is reported with `sec*proc` instead of just `sec`.
This commit is contained in:
parent
a6e32eb0c2
commit
5b829c89b8
@ -664,7 +664,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
||||
l != p.Labels.end(); ++l) {
|
||||
// only use labels found in labels
|
||||
if (labels.find(*l) != labels.end()) {
|
||||
labelTimes[*l] += result.ExecutionTime;
|
||||
labelTimes[*l] += result.ExecutionTime * result.Properties->Processors;
|
||||
++labelCounts[*l];
|
||||
}
|
||||
}
|
||||
@ -687,7 +687,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
||||
label.resize(maxlen + 3, ' ');
|
||||
|
||||
char buf[1024];
|
||||
sprintf(buf, "%6.2f sec", labelTimes[*i]);
|
||||
sprintf(buf, "%6.2f sec*proc", labelTimes[*i]);
|
||||
|
||||
std::ostringstream labelCountStr;
|
||||
labelCountStr << "(" << labelCounts[*i] << " test";
|
||||
|
@ -1,7 +1,7 @@
|
||||
100% tests passed, 0 tests failed out of 4
|
||||
+
|
||||
+Label Time Summary:
|
||||
+'bar' = +[0-9.]+ sec \(3 tests\)
|
||||
+'foo' = +[0-9.]+ sec \(1 test\)
|
||||
+'bar' = +[0-9.]+ sec\*proc \(3 tests\)
|
||||
+'foo' = +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,10 +1,10 @@
|
||||
17% tests passed, 5 tests failed out of 6
|
||||
+
|
||||
Subproject Time Summary:
|
||||
MyExperimentalFeature += +[0-9.]+ sec \(5 tests\)
|
||||
MyProductionCode += +[0-9.]+ sec \(1 test\)
|
||||
MyExperimentalFeature += +[0-9.]+ sec\*proc \(5 tests\)
|
||||
MyProductionCode += +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Label Time Summary:
|
||||
NotASubproject += +[0-9.]+ sec \(6 tests\)
|
||||
NotASubproject += +[0-9.]+ sec\*proc \(6 tests\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,10 +1,10 @@
|
||||
17% tests passed, 5 tests failed out of 6
|
||||
+
|
||||
Subproject Time Summary:
|
||||
MyExperimentalFeature += +[0-9.]+ sec \(5 tests\)
|
||||
MyProductionCode += +[0-9.]+ sec \(1 test\)
|
||||
MyExperimentalFeature += +[0-9.]+ sec\*proc \(5 tests\)
|
||||
MyProductionCode += +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Label Time Summary:
|
||||
NotASubproject += +[0-9.]+ sec \(6 tests\)
|
||||
NotASubproject += +[0-9.]+ sec\*proc \(6 tests\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,9 +1,9 @@
|
||||
0% tests passed, 1 tests failed out of 1
|
||||
+
|
||||
Subproject Time Summary:
|
||||
MyThirdPartyDependency += +[0-9.]+ sec \(1 test\)
|
||||
MyThirdPartyDependency += +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Label Time Summary:
|
||||
NotASubproject += +[0-9.]+ sec \(1 test\)
|
||||
NotASubproject += +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,6 +1,6 @@
|
||||
50% tests passed, 1 tests failed out of 2
|
||||
+
|
||||
Subproject Time Summary:
|
||||
MySubproject += +[0-9.]+ sec \(2 tests\)
|
||||
MySubproject += +[0-9.]+ sec\*proc \(2 tests\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,9 +1,9 @@
|
||||
67% tests passed, 1 tests failed out of 3
|
||||
+
|
||||
Subproject Time Summary:
|
||||
MySubproject += +[0-9.]+ sec \(2 tests\)
|
||||
MySubproject += +[0-9.]+ sec\*proc \(2 tests\)
|
||||
+
|
||||
Label Time Summary:
|
||||
NotASubproject += +[0-9.]+ sec \(1 test\)
|
||||
NotASubproject += +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,6 +1,6 @@
|
||||
67% tests passed, 1 tests failed out of 3
|
||||
+
|
||||
Label Time Summary:
|
||||
NotASubproject += +[0-9.]+ sec \(1 test\)
|
||||
NotASubproject += +[0-9.]+ sec\*proc \(1 test\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
@ -1,6 +1,6 @@
|
||||
50% tests passed, 1 tests failed out of 2
|
||||
+
|
||||
Subproject Time Summary:
|
||||
MySubproject += +[0-9.]+ sec \(2 tests\)
|
||||
MySubproject += +[0-9.]+ sec\*proc \(2 tests\)
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
|
Loading…
Reference in New Issue
Block a user