mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit 5: bundle jars with engine implementations
This commit is contained in:
Generated
+3
@@ -4,6 +4,9 @@
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-commons-5.0.0-ALPHA.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-engine-api-5.0.0-ALPHA.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-launcher-5.0.0-ALPHA.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit4-engine-5.0.0-ALPHA.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit4-runner-5.0.0-ALPHA.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit5-engine-5.0.0-ALPHA.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<orderEntry type="module" module-name="testFramework-java" scope="TEST" />
|
||||
<orderEntry type="module" module-name="debugger-impl" />
|
||||
<orderEntry type="module" module-name="junit5_rt" />
|
||||
<orderEntry type="library" name="junit5_rt" level="project" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
<Base>
|
||||
|
||||
@@ -61,9 +61,11 @@ import com.intellij.rt.execution.junit.RepeatCount;
|
||||
import com.intellij.rt.execution.testFrameworks.ForkedDebuggerHelper;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.PathsList;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.gen5.launcher.TestExecutionListener;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -163,6 +165,20 @@ public abstract class TestObject extends JavaTestFrameworkRunnableState<JUnitCon
|
||||
if (JUnitUtil.isJUnit5(GlobalSearchScope.allScope(project), project)) {
|
||||
javaParameters.getProgramParametersList().add(JUnitStarter.JUNIT5_PARAMETER);
|
||||
javaParameters.getClassPath().add(PathUtil.getJarPathForClass(JUnit5IdeaTestRunner.class));
|
||||
|
||||
final PathsList classPath = javaParameters.getClassPath();
|
||||
final List<String> paths = classPath.getPathList();
|
||||
final String pathForClass = PathUtil.getJarPathForClass(TestExecutionListener.class);
|
||||
final File libDirectory = new File(pathForClass).getParentFile();
|
||||
final File[] libJars = libDirectory.listFiles();
|
||||
if (libJars != null) {
|
||||
for (File jarFile : libJars) {
|
||||
final String filePath = jarFile.getAbsolutePath();
|
||||
if (!paths.contains(filePath)) {
|
||||
classPath.add(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return javaParameters;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user