Revert "bazel: calculate relevant jars root when delegating compilation to Bazel in TestCaseLoader" (IJI-3011)

This reverts commit 003c45991424e4c26bb8b19a10d23daf3c996c13.

GitOrigin-RevId: 05c2f4ccf27b85144a6a92a54868ba8f1846d6a0
This commit is contained in:
Ilia Kirianovskii
2025-09-15 16:01:12 +00:00
committed by intellij-monorepo-bot
parent 3cfb6d294f
commit 1613e79e2d
@@ -6,7 +6,6 @@ import com.intellij.idea.IJIgnore;
import com.intellij.idea.IgnoreJUnit3;
import com.intellij.nastradamus.NastradamusClient;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.testFramework.*;
import com.intellij.testFramework.bucketing.*;
@@ -620,19 +619,7 @@ public class TestCaseLoader {
if (myGetClassesCalled) {
throw new IllegalStateException("Cannot fill more classes after 'getClasses' was already called");
}
String relevantJarsRoot = PathManager.getArchivedCompliedClassesLocation();
Path currentJarPath = PathManager.getJarForClass(getClass());
if (relevantJarsRoot == null && currentJarPath != null) {
String bazelOutSubstring = "out/bazel-out";
int bazelOutPathIndex = FileUtilRt.toSystemIndependentName(currentJarPath.toString()).indexOf(bazelOutSubstring);
if (bazelOutPathIndex > 0) {
// Was compiled by Bazel, let's set a relevant compilation root if it was not set yet
relevantJarsRoot = currentJarPath.toString().substring(0, bazelOutPathIndex + 1 + bazelOutSubstring.length());
}
}
boolean noRelevantJarsRoot = StringUtil.isEmptyOrSpaces(relevantJarsRoot);
long t = System.nanoTime();