changeset 39675:20bd34eaf5de

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
author rfield
date Thu, 14 Jul 2016 11:14:22 -0700
parents de3b0e52ca17
children 45b094192c2c
files langtools/test/jdk/jshell/KullaCompletenessStressTest.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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};
+        }
     }
 }