option to ignore empty test suite

GitOrigin-RevId: ced13750aab3759f67921bd9f9ec991429c5f58c
This commit is contained in:
Dmitriy.Panov
2021-01-08 10:25:55 +00:00
committed by intellij-monorepo-bot
parent 668f3aab29
commit ac72177dfa
@@ -369,7 +369,7 @@ public class TestCaseLoader {
String message = "Number of test classes found: " + getClassesCount() + " time to load: " + (after - before) / 1000 + "s.";
System.out.println(message);
if (!RUN_ONLY_AFFECTED_TESTS && getClassesCount() == 0) {
if (!RUN_ONLY_AFFECTED_TESTS && getClassesCount() == 0 && !"true".equals(System.getProperty("idea.tests.ignoreEmptySuite"))) {
// Specially formatted error message will fail the build
// See https://www.jetbrains.com/help/teamcity/build-script-interaction-with-teamcity.html#BuildScriptInteractionwithTeamCity-ReportingMessagesForBuildLog
System.out.println("##teamcity[message text='Expected some tests to be executed, but no test classes were found.' status='ERROR']");