You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2020/07/19 00:48:09 UTC

[maven-surefire] branch fastqueue updated (b0832c4 -> 75ac32b)

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

tibordigana pushed a change to branch fastqueue
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.


 discard b0832c4  improvement with minimizing the creation of new strings in stripIllegalFilenameChars()
 discard 95c4d1b  [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
 discard df5f2af  [github] Upload artifact surefire-its
     new aacb2c8  [github] Upload artifact surefire-its
     new 4d59278  [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
     new 75ac32b  improvement with minimizing the creation of new strings in stripIllegalFilenameChars()

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b0832c4)
            \
             N -- N -- N   refs/heads/fastqueue (75ac32b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 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:
 .github/workflows/maven-windows-it1.yml | 2 +-
 .github/workflows/maven-windows-it2.yml | 2 +-
 .github/workflows/maven.yml             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


[maven-surefire] 03/03: improvement with minimizing the creation of new strings in stripIllegalFilenameChars()

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

tibordigana pushed a commit to branch fastqueue
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 75ac32b76232b9b9e497afda509086329f72302c
Author: tibordigana <ti...@apache.org>
AuthorDate: Sat Jul 18 23:22:36 2020 +0200

    improvement with minimizing the creation of new strings in stripIllegalFilenameChars()
---
 .../maven/plugin/surefire/report/FileReporterUtils.java    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
index 5c0e5b1..5ef0610 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
@@ -35,14 +35,18 @@ public final class FileReporterUtils
 
     public static String stripIllegalFilenameChars( String original )
     {
-        String result = original;
+        StringBuilder result = new StringBuilder( original );
         String illegalChars = getOSSpecificIllegalChars();
-        for ( int i = 0; i < illegalChars.length(); i++ )
+        for ( int i = 0, len = result.length(); i < len; i++ )
         {
-            result = result.replace( illegalChars.charAt( i ), '_' );
+            char charFromOriginal = result.charAt( i );
+            boolean isIllegalChar = illegalChars.indexOf( charFromOriginal ) != -1;
+            if ( isIllegalChar )
+            {
+                result.setCharAt( i, '_' );
+            }
         }
-
-        return result;
+        return result.toString();
     }
 
     private static String getOSSpecificIllegalChars()


[maven-surefire] 02/03: [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS

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

tibordigana pushed a commit to branch fastqueue
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 4d592782f4a2774468b90064cf614da09c940f95
Author: tibordigana <ti...@apache.org>
AuthorDate: Sat Jul 18 22:26:55 2020 +0200

    [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
---
 .../org/apache/maven/plugin/surefire/report/FileReporterUtils.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
index 31d1904..5c0e5b1 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
@@ -47,6 +47,10 @@ public final class FileReporterUtils
 
     private static String getOSSpecificIllegalChars()
     {
-        return IS_OS_WINDOWS ? "\\/:*?\"<>|\0" : "/\0";
+        // forbidden and quoted characters
+        // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
+        // https://cygwin.com/cygwin-ug-net/using-specialnames.html
+        // https://www.cyberciti.biz/faq/linuxunix-rules-for-naming-file-and-directory-names/
+        return IS_OS_WINDOWS ? "[],\\/:*?\"<>|\0" : "()&\\/:*?\"<>|\0";
     }
 }


[maven-surefire] 01/03: [github] Upload artifact surefire-its

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

tibordigana pushed a commit to branch fastqueue
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit aacb2c87bd716f1788534db3b19ac275bdd5f0d5
Author: tibordigana <ti...@apache.org>
AuthorDate: Sat Jul 18 14:35:36 2020 +0200

    [github] Upload artifact surefire-its
---
 .github/workflows/maven-windows-it1.yml | 17 ++++++++++++++++-
 .github/workflows/maven-windows-it2.yml | 17 ++++++++++++++++-
 .github/workflows/maven.yml             | 17 ++++++++++++++++-
 .github/workflows/smoketest.yml         |  8 +++++++-
 4 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/maven-windows-it1.yml b/.github/workflows/maven-windows-it1.yml
index 4679153..b3e112b 100644
--- a/.github/workflows/maven-windows-it1.yml
+++ b/.github/workflows/maven-windows-it1.yml
@@ -17,7 +17,13 @@
 
 name: GitHub CI for Windows 1
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - '**'
 
 jobs:
   build:
@@ -34,3 +40,12 @@ jobs:
 
       - name: Build with Maven
         run: mvn install -e -B -V -nsu --no-transfer-progress -P run-its "-Dit.test=**/jiras/*IT*.java,TestMethodPatternIT,TestMultipleMethodPatternsIT,TestMultipleMethodPatternsTestNGIT"
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        #if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/**/*
+            !surefire-its/target/*-1617
diff --git a/.github/workflows/maven-windows-it2.yml b/.github/workflows/maven-windows-it2.yml
index 58a04c1..c6805f0 100644
--- a/.github/workflows/maven-windows-it2.yml
+++ b/.github/workflows/maven-windows-it2.yml
@@ -17,7 +17,13 @@
 
 name: GitHub CI for Windows 2
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - '**'
 
 jobs:
   build:
@@ -37,3 +43,12 @@ jobs:
 
       - name: Build with Maven without Unit Tests
         run: mvn install -e -B -V -nsu --no-transfer-progress -rf :surefire-its -P run-its "-Dit.test=!**/jiras/*IT*.java,!TestMethodPatternIT,!TestMultipleMethodPatternsIT,!TestMultipleMethodPatternsTestNGIT"
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        #if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/**/*
+            !surefire-its/target/*-1617
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index d0c9786..6e3c403 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -17,7 +17,13 @@
 
 name: GitHub CI for *Nix
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - '**'
 
 jobs:
   build:
@@ -40,3 +46,12 @@ jobs:
 
       - name: Build with Maven
         run: mvn install -e -B -V -nsu --no-transfer-progress -P run-its
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        #if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/**/*
+            !surefire-its/target/*-1617
diff --git a/.github/workflows/smoketest.yml b/.github/workflows/smoketest.yml
index 7500579..67c17c7 100644
--- a/.github/workflows/smoketest.yml
+++ b/.github/workflows/smoketest.yml
@@ -17,7 +17,13 @@
 
 name: Unit Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - '**'
 
 jobs:
   build: