You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/02/28 13:48:55 UTC

[sling-ide-tooling] branch master updated (818a6a3 -> f275a4a)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git.


    from 818a6a3  SLING-8290 - BundleDeploymentTest failure on Jenkins
     new 9c86170  SLING-7597 - Investigate setting up Windows testing
     new f275a4a  SLING-7597 - Investigate setting up Windows testing

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile                                        | 69 ++++++++++++++++------
 .../apache/sling/ide/cli/impl/DirWatcherTest.java  |  5 ++
 ...JcrPartialCoverageAggregatesDeploymentTest.java | 10 +++-
 .../impl/ui/sightly/SightlyAutocompletionTest.java |  9 ++-
 4 files changed, 73 insertions(+), 20 deletions(-)


[sling-ide-tooling] 01/02: SLING-7597 - Investigate setting up Windows testing

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git

commit 9c8617025db4a68902cb05fb787b2288e0de0b71
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Feb 26 22:18:19 2019 +0100

    SLING-7597 - Investigate setting up Windows testing
    
    Ignore some flaky/failing tests on Windows.
---
 .../java/org/apache/sling/ide/cli/impl/DirWatcherTest.java     |  5 +++++
 .../test/impl/JcrPartialCoverageAggregatesDeploymentTest.java  | 10 ++++++++--
 .../ide/test/impl/ui/sightly/SightlyAutocompletionTest.java    |  9 ++++++++-
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/cli/cli/src/test/java/org/apache/sling/ide/cli/impl/DirWatcherTest.java b/cli/cli/src/test/java/org/apache/sling/ide/cli/impl/DirWatcherTest.java
index 5548afa..be17894 100644
--- a/cli/cli/src/test/java/org/apache/sling/ide/cli/impl/DirWatcherTest.java
+++ b/cli/cli/src/test/java/org/apache/sling/ide/cli/impl/DirWatcherTest.java
@@ -20,9 +20,12 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
+import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.greaterThanOrEqualTo;
+import static org.hamcrest.Matchers.not;
 import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
 
 import java.io.File;
 import java.io.IOException;
@@ -111,6 +114,8 @@ public class DirWatcherTest {
     @Test(timeout = 3000)
     public void deletedFile() throws IOException, InterruptedException {
         
+        assumeThat(System.getProperty("os.name"), not(containsString("Windows"))); // TODO - SLING-7596
+        
         File watchRoot = folder.newFolder();
         File subDir = new File(watchRoot, "subDir");
         subDir.mkdir();
diff --git a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/JcrPartialCoverageAggregatesDeploymentTest.java b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/JcrPartialCoverageAggregatesDeploymentTest.java
index 6a606df..18a3434 100644
--- a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/JcrPartialCoverageAggregatesDeploymentTest.java
+++ b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/JcrPartialCoverageAggregatesDeploymentTest.java
@@ -22,6 +22,9 @@ import static org.apache.sling.ide.test.impl.helpers.jcr.JcrMatchers.hasPath;
 import static org.apache.sling.ide.test.impl.helpers.jcr.JcrMatchers.hasPrimaryType;
 import static org.apache.sling.ide.test.impl.helpers.jcr.JcrMatchers.hasPropertyValue;
 import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assume.assumeThat;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
@@ -247,7 +250,8 @@ public class JcrPartialCoverageAggregatesDeploymentTest {
     
     @Test
     public void deployNodeWithContentXmlInParentFolder() throws Exception {
-        
+        assumeThat(System.getProperty("os.name"), not(containsString("Windows"))); // TODO - SLING-7596
+
         wstServer.waitForServerToStart();
 
         // create faceted project
@@ -315,7 +319,9 @@ public class JcrPartialCoverageAggregatesDeploymentTest {
     
     @Test
     public void deployNodeWithContentXmlInParentFolder_reverse() throws Exception {
-        
+
+        assumeThat(System.getProperty("os.name"), not(containsString("Windows"))); // TODO - SLING-7596
+
         wstServer.waitForServerToStart();
 
         // create faceted project
diff --git a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/ui/sightly/SightlyAutocompletionTest.java b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/ui/sightly/SightlyAutocompletionTest.java
index 635bceb..60263e2 100644
--- a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/ui/sightly/SightlyAutocompletionTest.java
+++ b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/ui/sightly/SightlyAutocompletionTest.java
@@ -16,8 +16,11 @@
  */
 package org.apache.sling.ide.test.impl.ui.sightly;
 
+import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assume.assumeThat;
 
 import java.io.ByteArrayInputStream;
 import java.util.List;
@@ -59,6 +62,8 @@ public class SightlyAutocompletionTest {
     @Test
     public void tagNameAutocompletion() throws Exception {
         
+        assumeThat(System.getProperty("os.name"), not(containsString("Windows"))); // TODO - SLING-7596
+
         List<String> proposals = new AutocompletionCallable() {
             @Override
             protected void prepareEditor(SWTBotEclipseEditor editor) {
@@ -74,7 +79,9 @@ public class SightlyAutocompletionTest {
     
     @Test
     public void attributeAutocompletion() throws Exception {
-        
+
+        assumeThat(System.getProperty("os.name"), not(containsString("Windows"))); // TODO - SLING-7596
+
         List<String> proposals = new AutocompletionCallable() {
             @Override
             protected void prepareEditor(SWTBotEclipseEditor editor) {


[sling-ide-tooling] 02/02: SLING-7597 - Investigate setting up Windows testing

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git

commit f275a4a61d4182fb53229c914aa6578879969d79
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Feb 26 22:02:43 2019 +0100

    SLING-7597 - Investigate setting up Windows testing
    
    Run Windows tests on Jenkins alongside the Linux ones, using a parallel
    execution for minimising delays.
---
 Jenkinsfile | 69 ++++++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 52 insertions(+), 17 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 539cd9d..8de6f29 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -4,39 +4,43 @@ def mvnVersion = 'Maven 3.3.9'
 def javaVersion = 'JDK 1.8 (latest)'
 
 node('ubuntu') {
-
     def helper = new SlingJenkinsHelper()
     helper.runWithErrorHandling({ jobConfig ->
+        parallel 'linux': generateStages('linux', mvnVersion, javaVersion),
+            'windows': generateStages('windows', mvnVersion, javaVersion)
+    })
+}
+
+// generates os-specific stages
+def generateStages(String os, def mvnVersion, def javaVersion) {
+    def isWindows = os == "windows"
+    def prefix = isWindows ? "win" : "linux"
 
-        stage('Build shared code') {
+    def stages = [
+        "[$prefix] Build shared code": {
             withMaven(maven: mvnVersion, jdk: javaVersion, options: [artifactsPublisher(disabled: true)]) {
                 timeout(10) {
-                    sh "mvn -f shared/modules clean install"
+                    runCmd "mvn -f shared/modules clean install"
                 }
             }
-        }
-
-        stage('Build CLI bundles') {
+        }, "[$prefix] Build CLI bundles": {
             withMaven(maven: mvnVersion, jdk: javaVersion, options: [artifactsPublisher(disabled: true)]) {
                 timeout(10) {
-                    sh "mvn -f cli clean install"
+                    runCmd "mvn -f cli clean install"
                 }
             }
-        }
-
-        stage ('Build shared code P2 repository') {
+        }, "[$prefix] Build shared code P2 repository": {
             withMaven(maven: mvnVersion, jdk: javaVersion, options: [artifactsPublisher(disabled: true)]) {
                 timeout(10) {
-                    sh 'mvn -f shared/p2 clean package'
+                    runCmd 'mvn -f shared/p2 clean package'
                 }
             }
-        }
-
-        stage ('Build Eclipse plug-ins') {
+        }, "[$prefix] Build Eclipse plug-ins": {
             withMaven(maven: mvnVersion, jdk: javaVersion, options: [artifactsPublisher(disabled: true)]) {
                 timeout(20) {
-                    wrap([$class: 'Xvfb']) {
-                        sh 'mvn -f eclipse clean verify -Ddebug'
+                    // workaround for https://issues.jenkins-ci.org/browse/JENKINS-39415
+                    wrap([$class: 'Xvfb', autoDisplayName: true]) {
+                        runCmd 'mvn -f eclipse clean verify'
                     }
                     // workaround for https://issues.jenkins-ci.org/browse/JENKINS-55889
                     junit 'eclipse/**/surefire-reports/*.xml' 
@@ -44,5 +48,36 @@ node('ubuntu') {
                 }
             }
         }
-    });
+    ]
+
+    // avoid wrapping Linux nodes again in node() context since that seems to make the 
+    // SCM checkout unavailable
+    if ( isWindows ) {
+        return {
+            node("Windows") {
+                checkout scm
+                stages.each { name, body ->
+                    stage(name) {
+                        body.call()
+                    }
+                }
+            }
+        }
+    }
+
+    return {
+        stages.each { name, body ->
+            stage(name) {
+                body.call()
+            }
+        }
+    }
+}
+
+def runCmd(def cmd) {
+    if (isUnix() ) {
+        sh cmd
+    } else {
+        bat cmd
+    }
 }