Don't print stack trace for ignored tests by default

This commit is contained in:
Zalim Bashorov
2018-09-07 23:35:51 +03:00
parent bd6f3fd9b2
commit 69ee88871f
4 changed files with 24 additions and 4 deletions
@@ -100,6 +100,9 @@ public class KotlinTestUtils {
private static final boolean RUN_IGNORED_TESTS_AS_REGULAR = private static final boolean RUN_IGNORED_TESTS_AS_REGULAR =
Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular"); Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular");
private static final boolean PRINT_STACKTRACE_FOR_IGNORED_TESTS =
Boolean.getBoolean("org.jetbrains.kotlin.print.stacktrace.for.ignored.tests");
private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true; private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true;
private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false; private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false;
@@ -1077,7 +1080,9 @@ public class KotlinTestUtils {
throw e; throw e;
} }
e.printStackTrace(); if (PRINT_STACKTRACE_FOR_IGNORED_TESTS) {
e.printStackTrace();
}
return; return;
} }
@@ -99,6 +99,9 @@ public class KotlinTestUtils {
private static final boolean RUN_IGNORED_TESTS_AS_REGULAR = private static final boolean RUN_IGNORED_TESTS_AS_REGULAR =
Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular"); Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular");
private static final boolean PRINT_STACKTRACE_FOR_IGNORED_TESTS =
Boolean.getBoolean("org.jetbrains.kotlin.print.stacktrace.for.ignored.tests");
private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true; private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true;
private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false; private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false;
@@ -1094,7 +1097,9 @@ public class KotlinTestUtils {
throw e; throw e;
} }
e.printStackTrace(); if (PRINT_STACKTRACE_FOR_IGNORED_TESTS) {
e.printStackTrace();
}
return; return;
} }
@@ -99,6 +99,9 @@ public class KotlinTestUtils {
private static final boolean RUN_IGNORED_TESTS_AS_REGULAR = private static final boolean RUN_IGNORED_TESTS_AS_REGULAR =
Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular"); Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular");
private static final boolean PRINT_STACKTRACE_FOR_IGNORED_TESTS =
Boolean.getBoolean("org.jetbrains.kotlin.print.stacktrace.for.ignored.tests");
private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true; private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true;
private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false; private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false;
@@ -1094,7 +1097,9 @@ public class KotlinTestUtils {
throw e; throw e;
} }
e.printStackTrace(); if (PRINT_STACKTRACE_FOR_IGNORED_TESTS) {
e.printStackTrace();
}
return; return;
} }
@@ -99,6 +99,9 @@ public class KotlinTestUtils {
private static final boolean RUN_IGNORED_TESTS_AS_REGULAR = private static final boolean RUN_IGNORED_TESTS_AS_REGULAR =
Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular"); Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular");
private static final boolean PRINT_STACKTRACE_FOR_IGNORED_TESTS =
Boolean.getBoolean("org.jetbrains.kotlin.print.stacktrace.for.ignored.tests");
private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true; private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true;
private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false; private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false;
@@ -1094,7 +1097,9 @@ public class KotlinTestUtils {
throw e; throw e;
} }
e.printStackTrace(); if (PRINT_STACKTRACE_FOR_IGNORED_TESTS) {
e.printStackTrace();
}
return; return;
} }