test/jdk/tools/lib/tests/Helper.java
changeset 51994 7577686cc9bd
parent 48223 962b4324320c
equal deleted inserted replaced
51993:c0d05cf1d19d 51994:7577686cc9bd
     1 /*
     1 /*
     2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    65     private final List<String> bootClasses;
    65     private final List<String> bootClasses;
    66     private final FileSystem fs;
    66     private final FileSystem fs;
    67 
    67 
    68     public static Helper newHelper() throws IOException {
    68     public static Helper newHelper() throws IOException {
    69         Path jdkHome = Paths.get(System.getProperty("test.jdk"));
    69         Path jdkHome = Paths.get(System.getProperty("test.jdk"));
    70         // JPRT not yet ready for jmods
       
    71         if (!Files.exists(jdkHome.resolve("jmods"))) {
    70         if (!Files.exists(jdkHome.resolve("jmods"))) {
       
    71             // Skip test if the jmods directory is missing (e.g. exploded image)
    72             System.err.println("Test not run, NO jmods directory");
    72             System.err.println("Test not run, NO jmods directory");
    73             return null;
    73             return null;
    74         }
    74         }
    75         return new Helper(jdkHome);
    75         return new Helper(jdkHome);
    76     }
    76     }