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 97ee2ff commit 90fa1e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/jdk/java/io/IO/IO.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* @bug 8305457
* @summary java.io.IO tests
* @library /test/lib
* @run junit IO
* @run junit/othervm IO
*/
public class IO {

Expand All @@ -55,12 +55,14 @@ public class IO {
public class OSSpecificTests {

private static Path expect;
static final int JCK_STATUS_BASE = 95;

@BeforeAll
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");
System.out.println("jtreg.SkippedException: '" + expect + "' not found");
System.exit(JCK_STATUS_BASE);
}
}

Expand Down

0 comments on commit 90fa1e1

Please sign in to comment.