8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist

Reviewed-by: djelinski
This commit is contained in:
SendaoYan 2024-05-27 06:32:21 +00:00 committed by Daniel Jeliński
parent 08d51003d1
commit 4e8deb396e

View File

@ -29,7 +29,7 @@ import java.util.stream.Stream;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jtreg.SkippedException;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.condition.EnabledOnOs;
@ -60,7 +60,7 @@ public class IO {
public static void prepareTTY() {
expect = Paths.get("/usr/bin/expect"); // os-specific path
if (!Files.exists(expect) || !Files.isExecutable(expect)) {
throw new SkippedException("'" + expect + "' not found");
Assumptions.abort("'" + expect + "' not found");
}
}