Skip to content

Commit

Permalink
8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist
Browse files Browse the repository at this point in the history
Signed-off-by: sendaoYan <yansendao.ysd@alibaba-inc.com>
  • Loading branch information
sendaoYan committed May 26, 2024
1 parent 90fa1e1 commit 78f06b2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/jdk/java/io/IO/IO.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

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;
Expand All @@ -46,7 +46,7 @@
* @bug 8305457
* @summary java.io.IO tests
* @library /test/lib
* @run junit/othervm IO
* @run junit IO
*/
public class IO {

Expand All @@ -61,8 +61,7 @@ public class OSSpecificTests {
public static void prepareTTY() {
expect = Paths.get("/usr/bin/expect"); // os-specific path
if (!Files.exists(expect) || !Files.isExecutable(expect)) {
System.out.println("jtreg.SkippedException: '" + expect + "' not found");
System.exit(JCK_STATUS_BASE);
Assumptions.abort("'" + expect + "' not found");
}
}

Expand Down

0 comments on commit 78f06b2

Please sign in to comment.