test framework [*]: restoring IoTestUtil#assumeUnix behavior (should allow macOS); cleanup (dead code)

GitOrigin-RevId: 9d19e7ba77b508bc5d52d212941618e3655432d1
This commit is contained in:
Roman Shevchenko
2026-01-30 13:08:43 +00:00
committed by intellij-monorepo-bot
parent 7cd16cea1d
commit 2c0c06fe0a
@@ -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);