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 08:06:24 UTC

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

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 75ac32b  improvement with minimizing the creation of new strings in stripIllegalFilenameChars()
 discard 4d59278  [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
 discard aacb2c8  [github] Upload artifact surefire-its
     new a2523ab  [github] Upload artifact surefire-its
     new 82063b4  [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
     new 74bf248  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   (75ac32b)
            \
             N -- N -- N   refs/heads/fastqueue (74bf248)

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


[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 74bf248ef3c23c9d8194392c7ab1619f11a052aa
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] 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 a2523ab5df862851cdf65a4bd4307f75b379ce89
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 | 20 +++++++++++++++++++-
 .github/workflows/maven-windows-it2.yml | 20 +++++++++++++++++++-
 .github/workflows/maven.yml             | 17 ++++++++++++++++-
 .github/workflows/smoketest.yml         |  8 +++++++-
 4 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/maven-windows-it1.yml b/.github/workflows/maven-windows-it1.yml
index 4679153..76cfca7 100644
--- a/.github/workflows/maven-windows-it1.yml
+++ b/.github/workflows/maven-windows-it1.yml
@@ -17,12 +17,21 @@
 
 name: GitHub CI for Windows 1
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - '**'
 
 jobs:
   build:
     runs-on: windows-latest
 
+    strategy:
+      fail-fast: false
+
     steps:
       - name: Checkout
         uses: actions/checkout@v1
@@ -34,3 +43,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..6f7d49d 100644
--- a/.github/workflows/maven-windows-it2.yml
+++ b/.github/workflows/maven-windows-it2.yml
@@ -17,12 +17,21 @@
 
 name: GitHub CI for Windows 2
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - '**'
 
 jobs:
   build:
     runs-on: windows-latest
 
+    strategy:
+      fail-fast: false
+
     steps:
       - name: Checkout
         uses: actions/checkout@v1
@@ -37,3 +46,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:


[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 82063b49eda314761b093bb35b2fefef24b08faa
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";
     }
 }