From 2c0c06fe0a46ef0c2252b6ba9bda286d20718c46 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 30 Jan 2026 11:01:45 +0100 Subject: [PATCH] test framework [*]: restoring `IoTestUtil#assumeUnix` behavior (should allow macOS); cleanup (dead code) GitOrigin-RevId: 9d19e7ba77b508bc5d52d212941618e3655432d1 --- .../src/com/intellij/openapi/util/io/IoTestUtil.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/platform/testFramework/src/com/intellij/openapi/util/io/IoTestUtil.java b/platform/testFramework/src/com/intellij/openapi/util/io/IoTestUtil.java index 4b9fec1dfe67..b4b2287d6a0e 100644 --- a/platform/testFramework/src/com/intellij/openapi/util/io/IoTestUtil.java +++ b/platform/testFramework/src/com/intellij/openapi/util/io/IoTestUtil.java @@ -1,4 +1,4 @@ -// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.util.io; import com.intellij.execution.ExecutionException; @@ -6,12 +6,10 @@ import com.intellij.execution.configurations.GeneralCommandLine; import com.intellij.execution.process.ProcessOutput; import com.intellij.execution.util.ExecUtil; import com.intellij.execution.wsl.WSLDistribution; -import com.intellij.execution.wsl.WslPath; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.text.StringUtil; -import com.intellij.testFramework.UsefulTestCase; import com.intellij.util.ThrowableRunnable; import com.intellij.util.io.SuperUserStatus; import com.intellij.util.system.OS; @@ -115,7 +113,7 @@ public final class IoTestUtil { } public static void assumeUnix() throws AssumptionViolatedException { - assumeTrue("Need Unix, can't run on " + OS.CURRENT, OS.isGenericUnix()); + assumeFalse("Need Unix, can't run on " + OS.CURRENT, OS.CURRENT == OS.Windows); } public static void assumeCaseSensitiveFS() throws AssumptionViolatedException { @@ -130,11 +128,6 @@ public final class IoTestUtil { assumeTrue("'wsl.exe' not found in %Path%", WSLDistribution.findWslExe() != null); } - public static @NotNull Path createWslTempDir(@NotNull String wslVm, @NotNull String testName) throws IOException { - var parent = Path.of(new WslPath(wslVm, "/tmp").toWindowsUncPath()); - return Files.createTempDirectory(parent, UsefulTestCase.TEMP_DIR_MARKER + testName + "_"); - } - public static @NotNull File createJunction(@NotNull String target, @NotNull String junction) { assertSame(OS.CURRENT, OS.Windows); File targetFile = new File(target);