8161132: JShell tests: jdk/jshell/KullaCompletenessStressTest.java should pass if jdk.shell sources are not provided
Reviewed-by: rfield
Contributed-by: andrey.x.nazarov@oracle.com
--- a/langtools/test/jdk/jshell/KullaCompletenessStressTest.java Thu Jul 14 11:57:15 2016 -0600
+++ b/langtools/test/jdk/jshell/KullaCompletenessStressTest.java Thu Jul 14 11:14:22 2016 -0700
@@ -37,10 +37,6 @@
public class KullaCompletenessStressTest extends CompletenessStressTest {
@Override
public File[] getDirectoriesToTest() {
- return new File[]{ getKullaSourceDirectory() };
- }
-
- public File getKullaSourceDirectory() {
String src = System.getProperty("test.src");
File file;
if (src == null) {
@@ -48,6 +44,11 @@
} else {
file = new File(src, "../../../src/jdk.jshell/share/classes");
}
- return file;
+ if (!file.exists()) {
+ System.out.println("jdk.jshell sources are not exist. Test has been skipped. Path: " + file.toString());
+ return new File[]{};
+ }else {
+ return new File[]{file};
+ }
}
}