You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/09/11 11:32:22 UTC

[GitHub] JaroslavTulach closed pull request #805: Fix cluster tests

JaroslavTulach closed pull request #805: Fix cluster tests
URL: https://github.com/apache/incubator-netbeans/pull/805
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ide/derby/nbproject/project.properties b/ide/derby/nbproject/project.properties
index 12604e6af9..6a2d8f8cf8 100644
--- a/ide/derby/nbproject/project.properties
+++ b/ide/derby/nbproject/project.properties
@@ -19,6 +19,7 @@ javac.source=1.7
 javac.compilerargs=-Xlint:unchecked
 
 release.build/derbysampledb.zip=modules/ext/derbysampledb.zip
+extra.module.files=modules/ext/derbysampledb.zip
 jnlp.indirect.jars=\
     modules/ext/derbysampledb.zip
 
diff --git a/java/j2ee.eclipselink/nbproject/project.properties b/java/j2ee.eclipselink/nbproject/project.properties
index aa8d8f16d5..579bee8fd0 100644
--- a/java/j2ee.eclipselink/nbproject/project.properties
+++ b/java/j2ee.eclipselink/nbproject/project.properties
@@ -33,4 +33,6 @@ release.external/org.eclipse.persistence.antlr-2.5.2.jar=modules/ext/eclipselink
 release.external/org.eclipse.persistence.jpa-2.5.2.jar=modules/ext/eclipselink/org.eclipse.persistence.jpa-2.5.2.jar
 release.external/org.eclipse.persistence.jpa.jpql-2.5.2.jar=modules/ext/eclipselink/org.eclipse.persistence.jpa.jpql-2.5.2.jar
 release.external/javax.persistence-2.1.0.jar=modules/ext/eclipselink/javax.persistence-2.1.0.jar
-release.build/javax.persistence-2.1.0-doc.zip=modules/ext/docs/javax.persistence-2.1.0-doc.zip
\ No newline at end of file
+release.build/javax.persistence-2.1.0-doc.zip=modules/ext/docs
+
+extra.module.files=modules/ext/docs/javax.persistence-2.1.0-doc.zip
diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Empty.java.template b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Empty.java.template
index e69de29bb2..8b13789179 100644
--- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Empty.java.template
+++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Empty.java.template
@@ -0,0 +1 @@
+
diff --git a/java/java.source/src/org/netbeans/modules/java/resources/templates/Empty.template b/java/java.source/src/org/netbeans/modules/java/resources/templates/Empty.template
index e69de29bb2..8b13789179 100644
--- a/java/java.source/src/org/netbeans/modules/java/resources/templates/Empty.template
+++ b/java/java.source/src/org/netbeans/modules/java/resources/templates/Empty.template
@@ -0,0 +1 @@
+
diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/ResolveList.java b/nbbuild/antsrc/org/netbeans/nbbuild/ResolveList.java
index 2c1a0f4027..3a3c656943 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/ResolveList.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/ResolveList.java
@@ -44,6 +44,7 @@
     private File dir;
     private String path;
     private Set<String> modules;
+    private boolean ignoreMissing;
 
     /** Comma-separated list of properties to expand */
     public void setList (String s) {
@@ -59,6 +60,10 @@ public void setModules (String s) {
         while (tok.hasMoreTokens ())
             modules.add(tok.nextToken ());
     }
+    
+    public void setIgnoreMissing(boolean m) {
+        this.ignoreMissing = m;
+    }
 
     /** New property name */
     public void setName(String s) {
@@ -133,7 +138,16 @@ private void seekHarderExecute() {
             File cluster = fileUtils.resolveFile(dir, clusterDir);
 
             for (String p : props) {
-                String[] pValues = getProject().getProperty(p).split(",");
+                String pval = getProject().getProperty(p);
+                if (pval == null) {
+                    if (ignoreMissing) {
+                        continue;
+                    } else {
+                        throw new BuildException("Missing definition for " + p);
+                    }
+                    
+                }
+                String[] pValues = pval.split(",");
 
                 for (String oneValue : pValues) {
                     if (modules != null && !modules.contains(oneValue)) {
diff --git a/nbbuild/build.xml b/nbbuild/build.xml
index 0b75767524..c0bfe28203 100644
--- a/nbbuild/build.xml
+++ b/nbbuild/build.xml
@@ -1464,10 +1464,10 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in d
     <mkdir dir="${build.test.results.dir}"/>
 
     <taskdef name="resolvelist" classname="org.netbeans.nbbuild.ResolveList" classpath="${nbantext.jar}"/>
-    <resolvelist list="${nb.clusters.list}" name="nb.clusters.validation.list">
+    <resolvelist list="${nb.clusters.list}" name="nb.clusters.validation.list" path="modules.fullpath" dir="${nb_all}" ignoremissing="true">
        <mapper type="regexp" from="(.*)" to="validation.\1"/>
     </resolvelist>
-    
+    <echo message="Run commit validation on: ${nb.clusters.validation.list}"/>
     <subant target="${test.type}" >
         <property name="test.config" value="commit"/>
         <property name="continue.after.failing.tests" value="true"/>
diff --git a/nbbuild/cluster.properties b/nbbuild/cluster.properties
index 4e7a87088b..8927b13030 100644
--- a/nbbuild/cluster.properties
+++ b/nbbuild/cluster.properties
@@ -566,7 +566,6 @@ nb.cluster.java=\
         editor.htmlui,\
         findbugs.installer,\
         form,\
-        form.j2ee,\
         form.kit,\
         form.nb,\
         form.refactoring,\
diff --git a/platform/o.n.bootstrap/test/unit/src/org/netbeans/SetupHid.java b/platform/o.n.bootstrap/test/unit/src/org/netbeans/SetupHid.java
index 091debc74e..84aab18e9a 100644
--- a/platform/o.n.bootstrap/test/unit/src/org/netbeans/SetupHid.java
+++ b/platform/o.n.bootstrap/test/unit/src/org/netbeans/SetupHid.java
@@ -318,7 +318,7 @@ private static void compile(List<String> options, Iterable<File> files) throws I
         JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
         StandardJavaFileManager mgr = compiler.getStandardFileManager(null, null, null);
         List<String> fullOptions = new ArrayList<String>(options);
-        fullOptions.addAll(Arrays.asList("-source", "1.5", "-target", "1.5"));
+        fullOptions.addAll(Arrays.asList("-source", "6", "-target", "6"));
         if (!compiler.getTask(null, mgr, null, fullOptions, null, mgr.getJavaFileObjectsFromFiles(files)).call()) {
             throw new IOException("compilation failed");
         }
diff --git a/platform/o.n.core/nbproject/project.properties b/platform/o.n.core/nbproject/project.properties
index 98ef1c7d77..b9d4b94c2b 100644
--- a/platform/o.n.core/nbproject/project.properties
+++ b/platform/o.n.core/nbproject/project.properties
@@ -19,12 +19,16 @@ javac.compilerargs=-Xlint:unchecked
 javac.source=1.7
 javac.target=1.7
 
+requires.nb.javac=true
+
 javadoc.arch=${basedir}/arch.xml
 javadoc.apichanges=${basedir}/apichanges.xml
 
 jnlp.verify.excludes=config/ModuleAutoDeps/org-netbeans-core.xml, LICENSE.txt, DISTRIBUTION.txt, THIRDPARTYLICENSEREADME.txt
 
 test.excludes=\
+    gui/propertyeditors/PropertiesTest.class,\
+    gui/propertyeditors/PropertyEditorsTest.class,\
     org/netbeans/core/lookup/data/,\
     org/netbeans/core/projects/data/
 
diff --git a/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassLinkageTest.java b/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassLinkageTest.java
index 0993df7615..68f616f758 100644
--- a/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassLinkageTest.java
+++ b/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassLinkageTest.java
@@ -104,6 +104,10 @@ public void testClassLinkage() throws Exception {
                     }
                     if (clazz.equals("org.netbeans.modules.javacard.source.JavaCardErrorProcessor")) {
                         continue; // seems to link against JDK 7 javac's AbstractTypeProcessor
+                    }
+                    if (clazz.startsWith("org.netbeans.modules.javahelp")) {
+                        // javahelp is not distributed with Apache
+                        continue; 
                     }
                         Throwable t = null;
                         try {
diff --git a/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateLayerConsistencyTest.java b/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateLayerConsistencyTest.java
index bcca725897..9f0ecf84e3 100755
--- a/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateLayerConsistencyTest.java
+++ b/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateLayerConsistencyTest.java
@@ -998,7 +998,8 @@ public void testTemplates() throws Exception { // #167205
             }
             String path = f.getPath();
             if (path.equals("Templates/Other/file") ||
-                path.equals("Templates/Other/group.group")) {
+                path.equals("Templates/Other/group.group") ||
+                path.equals("Templates/Classes/Package")) {
                 
                 // If there're more files like this, consider adding an API
                 // to mark them as intentionally non-editable
diff --git a/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateModulesTest.java b/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateModulesTest.java
index f32e857ef8..fa6c90cac8 100644
--- a/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateModulesTest.java
+++ b/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateModulesTest.java
@@ -134,10 +134,19 @@ public void testConsistency() throws Exception {
         Set<Manifest> manifests = loadManifests();
         SortedMap<String,SortedSet<String>> problems = ConsistencyVerifier.findInconsistencies(manifests, null);
         if (!problems.isEmpty()) {
-            StringBuilder message = new StringBuilder("Problems found with autoloads");
+            StringBuilder message = new StringBuilder();
             for (Map.Entry<String, SortedSet<String>> entry : problems.entrySet()) {
+                // hack: the module is required, but is not installed in the distribution.
+                if ("org.netbeans.modules.java.source.nbjavac".equals(entry.getKey()) &&
+                    entry.getValue().size() == 1 && entry.getValue().first().contains("org.netbeans.modules.nbjavac")) {
+                    continue;
+                }
                 message.append("\nProblems found for module ").append(entry.getKey()).append(": ").append(entry.getValue());
             }
+            if (message.length() == 0) {
+                return;
+            }
+            message.insert(0, "Problems found with autoloads");
             fail(message.toString());
         }
     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists