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

This commit is contained in:
Rolf Bjarne Kvinge 2019-05-22 23:19:41 -07:00 коммит произвёл GitHub
Родитель a2e9b599fe
Коммит dbc9157945
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -1772,7 +1772,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 ()) {
@ -1856,7 +1859,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 ()) {