Skip to content

Switch headless tests to radler#8367

Merged
LeFrosch merged 6 commits into
bazelbuild:masterfrom
LeFrosch:pull/a2ab9888341a6da1b85bbbfe5f1c60f54c62ec60
Jun 26, 2026
Merged

Switch headless tests to radler#8367
LeFrosch merged 6 commits into
bazelbuild:masterfrom
LeFrosch:pull/a2ab9888341a6da1b85bbbfe5f1c60f54c62ec60

Conversation

@LeFrosch

Copy link
Copy Markdown
Collaborator

Since classic is going to be unbundled with 262 the dependency on classic has to be removed and headless tests need to run with radler. Furthermore, this allows us to finally write gutter icon tests down the line.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates Bazel module dependencies, adds test-framework-team-city.jar to the CLion 261 SDK, and switches the suppressed plugin set from classic to radler in CLion test definitions. It also refactors ClwbHeadlessTestCase to resolve and symlink both bin and lib sandbox directories prior to application startup. Feedback on these changes highlights a critical issue in linkSandboxDir where local test execution could lead to the accidental deletion of SDK files if the symlink and target paths are identical; adding a path equality check is recommended to prevent this.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 83 to 93
private static void linkSandboxDir(Path sdkRoot, String dirName, Path link) {
final var target = sdkRoot.resolve(dirName);
assertExists(target.toFile());

try {
final var link = Path.of(PathManager.getBinPath());
Files.deleteIfExists(link);
Files.createSymbolicLink(link, sdkBinPath);
Files.createSymbolicLink(link, target);
} catch (IOException e) {
abort("could not create bin path symlink", e);
abort("could not create " + dirName + " path symlink", e);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If link and target point to the same path (for example, when running tests locally where idea.home.path points directly to the SDK), calling Files.deleteIfExists(link) will attempt to delete the actual SDK directory, which will fail or delete SDK files. We should add a guard to return early if link and target are the same path.

  private static void linkSandboxDir(Path sdkRoot, String dirName, Path link) {
    final var target = sdkRoot.resolve(dirName);
    assertExists(target.toFile());

    if (link.toAbsolutePath().equals(target.toAbsolutePath())) {
      return;
    }

    try {
      Files.deleteIfExists(link);
      Files.createSymbolicLink(link, target);
    } catch (IOException e) {
      abort("could not create " + dirName + " path symlink", e);
    }
  }

@LeFrosch LeFrosch force-pushed the pull/a2ab9888341a6da1b85bbbfe5f1c60f54c62ec60 branch 2 times, most recently from 0402c4a to 1d0399f Compare June 23, 2026 08:55
@LeFrosch LeFrosch force-pushed the pull/a2ab9888341a6da1b85bbbfe5f1c60f54c62ec60 branch from 1d0399f to 69b9f9d Compare June 23, 2026 09:27
LeFrosch added 2 commits June 23, 2026 15:07
# Conflicts:
#	clwb/tests/headlesstests/com/google/idea/blaze/clwb/LibCppTest.java
@LeFrosch LeFrosch force-pushed the pull/a2ab9888341a6da1b85bbbfe5f1c60f54c62ec60 branch from 69b9f9d to 837accd Compare June 23, 2026 13:08
@LeFrosch LeFrosch marked this pull request as ready for review June 26, 2026 10:55
@LeFrosch LeFrosch requested review from mai93 and ujohnny as code owners June 26, 2026 10:55
@github-actions github-actions Bot added product: CLion CLion plugin awaiting-review Awaiting review from Bazel team on PRs labels Jun 26, 2026
@LeFrosch LeFrosch merged commit 4530f5c into bazelbuild:master Jun 26, 2026
6 checks passed
@LeFrosch LeFrosch deleted the pull/a2ab9888341a6da1b85bbbfe5f1c60f54c62ec60 branch June 26, 2026 11:18
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Jun 26, 2026
@github-actions github-actions Bot removed the awaiting-review Awaiting review from Bazel team on PRs label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: CLion CLion plugin

Projects

Development

Successfully merging this pull request may close these issues.

2 participants