[d16-2] [xharness] Don't report tests whose device were not found if there were no such tests. (#6169)

This commit is contained in:
monojenkins 2019-06-03 16:47:41 -04:00 коммит произвёл Manuel de la Pena
Родитель f7d7c7668a
Коммит e27067ab30
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -1721,7 +1721,10 @@ namespace xharness
markdown_summary.Write ($"# Test run in progress: ");
markdown_summary.Write (string.Join (", ", list));
} else if (failedTests.Any ()) {
markdown_summary.Write ($"{failedTests.Count ()} tests failed, {deviceNotFound.Count ()} tests' device not found, {passedTests.Count ()} tests passed.");
markdown_summary.Write ($"{failedTests.Count ()} tests failed, ");
if (deviceNotFound.Any ())
markdown_summary.Write ($"{deviceNotFound.Count ()} tests' device not found, ");
markdown_summary.Write ($"{passedTests.Count ()} tests passed.");
} else if (deviceNotFound.Any ()) {
markdown_summary.Write ($"{deviceNotFound.Count ()} tests' device not found, {passedTests.Count ()} tests passed.");
} else if (passedTests.Any ()) {
@ -1805,7 +1808,10 @@ namespace xharness
writer.Write (string.Join (", ", list));
writer.Write (")");
} else if (failedTests.Any ()) {
writer.Write ($"{failedTests.Count ()} tests failed, {deviceNotFound.Count ()} tests' device not found, {passedTests.Count ()} tests passed");
writer.Write ($"{failedTests.Count ()} tests failed, ");
if (deviceNotFound.Any ())
writer.Write ($"{deviceNotFound.Count ()} tests' device not found, ");
writer.Write ($"{passedTests.Count ()} tests passed");
} else if (deviceNotFound.Any ()) {
writer.Write ($"{deviceNotFound.Count ()} tests' device not found, {passedTests.Count ()} tests passed");
} else if (passedTests.Any ()) {