summaryrefslogtreecommitdiff
path: root/python/src/com/jetbrains/python/testing/TestRunConfigurationReRunResponsible.java
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/com/jetbrains/python/testing/TestRunConfigurationReRunResponsible.java')
-rw-r--r--python/src/com/jetbrains/python/testing/TestRunConfigurationReRunResponsible.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/python/src/com/jetbrains/python/testing/TestRunConfigurationReRunResponsible.java b/python/src/com/jetbrains/python/testing/TestRunConfigurationReRunResponsible.java
new file mode 100644
index 000000000000..a8e9e1f8d5e4
--- /dev/null
+++ b/python/src/com/jetbrains/python/testing/TestRunConfigurationReRunResponsible.java
@@ -0,0 +1,30 @@
+package com.jetbrains.python.testing;
+
+import com.intellij.execution.ExecutionException;
+import com.intellij.execution.Executor;
+import com.intellij.execution.configurations.RunProfileState;
+import com.intellij.execution.runners.ExecutionEnvironment;
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.Collection;
+
+/**
+ * Configuration that handles rerun failed tests itself.
+ *
+ * @author Ilya.Kazakevich
+ */
+public interface TestRunConfigurationReRunResponsible {
+ /**
+ * Rerun failed tests
+ * @param executor test executor
+ * @param environment test environment
+ * @param failedTests a pack of psi elements, indicating failed tests (to retrn)
+ * @return state to run or null if no rerun actions found (i.e. no errors in failedTest, empty etc)
+ * @throws ExecutionException failed to run
+ */
+ @Nullable
+ RunProfileState rerunTests(@NotNull final Executor executor, @NotNull final ExecutionEnvironment environment,
+ @NotNull Collection<PsiElement> failedTests) throws ExecutionException;
+}