Fridrich Strba 2022-04-26 10:00:11 +00:00 committed by Git OBS Bridge
parent 73b8c5df08
commit 9a4251a638
5 changed files with 79 additions and 21 deletions

View File

@ -0,0 +1,34 @@
--- a/surefire-providers/surefire-testng/pom.xml
+++ b/surefire-providers/surefire-testng/pom.xml
@@ -51,8 +51,7 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>5.10</version>
- <classifier>jdk15</classifier>
+ <version>7.4.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
+++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
@@ -63,7 +63,7 @@ public void configure( TestNG testng, Map<String, String> options )
testng.setUseDefaultListeners( false );
configureInstance( testng, options );
// TODO: we should have the Profile so that we can decide if this is needed or not
- testng.setListenerClasses( loadListenerClasses( listeners ) );
+ testng.setListenerClasses( ( List ) loadListenerClasses( listeners ) );
}
@Override
--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
+++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
@@ -68,7 +68,7 @@ public void configure( XmlSuite suite, Map<String, String> options )
String parallel = options.get( PARALLEL_PROP );
if ( parallel != null )
{
- suite.setParallel( parallel );
+ suite.setParallel( XmlSuite.ParallelMode.getValidParallel( parallel ) );
}
}

View File

@ -1,15 +1,44 @@
From 6f1e595890521c0c3448457f112c1598d8b9c7f9 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 16 Mar 2018 13:45:01 +0100
Subject: [PATCH 4/4] Port to current maven-shared-utils
---
.../surefire/report/StatelessXmlReporter.java | 16 ++++++++++------
pom.xml | 2 +-
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
index dad9808..111b92b 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java 2022-04-26 11:44:38.061316377 +0200
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java 2022-04-26 11:50:27.427430853 +0200
@@ -22,6 +22,7 @@
import org.apache.maven.plugin.surefire.JdkAttributes;
import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
+import org.apache.maven.shared.utils.cli.CommandLineException;
import org.apache.maven.surefire.booter.AbstractPathConfiguration;
import org.apache.maven.surefire.booter.Classpath;
import org.apache.maven.surefire.booter.StartupConfiguration;
@@ -130,14 +131,26 @@
String jvmArgLine = newJvmArgLine( forkNumber );
if ( !jvmArgLine.isEmpty() )
{
- cli.createArg()
- .setLine( jvmArgLine );
+ try
+ {
+ cli.createArg().setLine( jvmArgLine );
+ }
+ catch ( CommandLineException e )
+ {
+ throw new SurefireBooterForkException( "Problem to set jvmArgLine: " + e.getMessage(), e );
+ }
}
if ( getDebugLine() != null && !getDebugLine().isEmpty() )
{
- cli.createArg()
- .setLine( getDebugLine() );
+ try
+ {
+ cli.createArg().setLine( getDebugLine() );
+ }
+ catch ( CommandLineException e )
+ {
+ throw new SurefireBooterForkException( "Problem to set debug line: " + e.getMessage(), e );
+ }
}
resolveClasspath( cli, findStartClass( config ), config );
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
@@ -237,6 +237,10 @@ public class StatelessXmlReporter
@ -77,8 +106,6 @@ index dad9808..111b92b 100644
{
xmlWriter.startElement( "properties" );
for ( final Entry<String, String> entry : systemProperties.entrySet() )
diff --git a/pom.xml b/pom.xml
index efc9342..6492689 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,7 @@
@ -86,10 +113,7 @@ index efc9342..6492689 100644
<commonsLang3Version>3.5</commonsLang3Version>
<commonsIoVersion>2.5</commonsIoVersion>
- <mavenSharedUtilsVersion>0.9</mavenSharedUtilsVersion>
+ <mavenSharedUtilsVersion>3.2.1</mavenSharedUtilsVersion>
+ <mavenSharedUtilsVersion>3.3.3</mavenSharedUtilsVersion>
<powermockVersion>2.0.0-beta.5</powermockVersion>
<maven.surefire.scm.devConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-surefire.git</maven.surefire.scm.devConnection>
<maven.site.path>surefire-archives/surefire-LATEST</maven.site.path>
--
2.17.1

View File

@ -31,7 +31,7 @@ Source1: generate-tarball.sh
Source2: http://junit.sourceforge.net/cpl-v10.html
Patch0: 0001-Maven-3.patch
Patch1: 0002-Port-to-current-doxia.patch
Patch2: 0003-Port-to-TestNG-6.11.patch
Patch2: 0003-Port-to-TestNG-7.4.0.patch
Patch3: 0004-Port-to-current-maven-shared-utils.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8

View File

@ -31,7 +31,7 @@ Source1: generate-tarball.sh
Source2: http://junit.sourceforge.net/cpl-v10.html
Patch0: 0001-Maven-3.patch
Patch1: 0002-Port-to-current-doxia.patch
Patch2: 0003-Port-to-TestNG-6.11.patch
Patch2: 0003-Port-to-TestNG-7.4.0.patch
Patch3: 0004-Port-to-current-maven-shared-utils.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8

View File

@ -31,7 +31,7 @@ Source2: http://junit.sourceforge.net/cpl-v10.html
Source10: %{name}-build.tar.xz
Patch0: 0001-Maven-3.patch
Patch1: 0002-Port-to-current-doxia.patch
Patch2: 0003-Port-to-TestNG-6.11.patch
Patch2: 0003-Port-to-TestNG-7.4.0.patch
Patch3: 0004-Port-to-current-maven-shared-utils.patch
Patch10: %{name}-bootstrap-resources.patch
BuildRequires: ant