Sync from SUSE:SLFO:Main testng revision 18d5a4c55b7df3695e07bed0c12230c4

This commit is contained in:
Adrian Schröter 2024-05-04 01:07:18 +02:00
commit 51043d7e64
10 changed files with 710 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,27 @@
From bce3019741aeb785658b23095ae408a6c2d8ca35 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Wed, 31 May 2017 13:44:36 +0200
Subject: [PATCH 1/2] Avoid accidental javascript in javadoc
---
src/main/java/org/testng/xml/TestNGContentHandler.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/testng/xml/TestNGContentHandler.java b/src/main/java/org/testng/xml/TestNGContentHandler.java
index b74572a..7c490e9 100644
--- a/src/main/java/org/testng/xml/TestNGContentHandler.java
+++ b/src/main/java/org/testng/xml/TestNGContentHandler.java
@@ -250,7 +250,9 @@ public class TestNGContentHandler extends DefaultHandler {
}
}
- /** Parse <script> */
+ /**
+ * Parse &lt;script&gt;
+ */
private void xmlScript(boolean start, Attributes attributes) {
if (start) {
m_currentLanguage = attributes.getValue("language");
--
2.20.1

View File

@ -0,0 +1,38 @@
From 9155677e2d5acdd2379c38041189da52c7f04946 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Wed, 18 Jul 2018 15:57:49 +0200
Subject: [PATCH 2/2] Replace bundled jquery with CDN link
---
src/main/java/org/testng/reporters/jq/Main.java | 1 -
src/main/resources/org/testng/header | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/testng/reporters/jq/Main.java b/src/main/java/org/testng/reporters/jq/Main.java
index efd6799..2d8b74e 100644
--- a/src/main/java/org/testng/reporters/jq/Main.java
+++ b/src/main/java/org/testng/reporters/jq/Main.java
@@ -21,7 +21,6 @@ public class Main implements IReporter {
private static final String TESTNG_RESOURCE_PREFIX = "/org/testng/";
private static final String[] RESOURCES =
new String[] {
- "jquery.min.js",
"testng-reports.css",
"testng-reports.js",
"testng-reports1.css",
diff --git a/src/main/resources/org/testng/header b/src/main/resources/org/testng/header
index f5abbc3..817badc 100644
--- a/src/main/resources/org/testng/header
+++ b/src/main/resources/org/testng/header
@@ -7,7 +7,7 @@
<link type="text/css" href="testng-reports1.css" rel="stylesheet" id="ultra" />
<link type="text/css" href="testng-reports.css" rel="stylesheet" id="retro" disabled="false"/>
- <script type="text/javascript" src="jquery.min.js"></script>
+ <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="testng-reports.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type='text/javascript'>
--
2.31.1

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/cbeust/testng.git</param>
<param name="revision">7.4.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="exclude">bin*</param>
<param name="exclude">gradle*</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

240
pom.xml Normal file
View File

@ -0,0 +1,240 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- Refer to the file ./build-with-maven for instruction on how to use this pom.xml -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<packaging>jar</packaging>
<name>TestNG</name>
<version>@VERSION@</version>
<description>TestNG is a testing framework.</description>
<url>http://testng.org</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:cbeust/testng.git</connection>
<developerConnection>scm:git:git@github.com:cbeust/testng.git</developerConnection>
<url>git@github.com:cbeust/testng.git</url>
</scm>
<developers>
<developer>
<name>Cedric Beust</name>
</developer>
</developers>
<distributionManagement>
<repository>
<id>bintray</id>
<url>https://api.bintray.com/maven/cbeust/maven/testng</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.64</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.7</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache-extras.beanshell</groupId>
<artifactId>bsh</artifactId>
<version>2.0b6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<!-- Generating Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<failOnError>false</failOnError>
<excludePackageNames>*internal</excludePackageNames>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Bundle sources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Compilation -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Resource handling -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<!-- OSGi manifest creation -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<_versionpolicy>$(@)</_versionpolicy>
<Export-Package>com.beust.testng,org.testng*</Export-Package>
<Import-Package>
com.beust.jcommander.*;version="[1.7.0,3.0.0)",
bsh.*;version="[2.0.0,3.0.0)";resolution:=optional,
com.google.inject.*;version="[1.2,1.3)";resolution:=optional,
junit.framework;version="[3.8.1, 5.0.0)";resolution:=optional,
org.junit.*;resolution:=optional,
org.apache.tools.ant.*;version="[1.7.0, 2.0.0)";resolution:=optional,
org.yaml.*;version="[1.6,2.0)";resolution:=optional,
!com.beust.testng,
!org.testng.*,
!com.sun.*,
*
</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<!-- Add OSGi manifest in JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<!-- Tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>listener</name>
<value>test.invokedmethodlistener.MyListener</value>
</property>
</properties>
<systemPropertyVariables>
<test.resources.dir>${project.build.testOutputDirectory}</test.resources.dir>
</systemPropertyVariables>
</configuration>
</plugin>
<!-- Signing with gpg -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

BIN
testng-7.4.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,14 @@
diff --git a/src/main/java/org/testng/JarFileUtils.java b/src/main/java/org/testng/JarFileUtils.java
index 683a8b5..2f2ed8f 100644
--- a/src/main/java/org/testng/JarFileUtils.java
+++ b/src/main/java/org/testng/JarFileUtils.java
@@ -77,6 +77,9 @@ class JarFileUtils {
if (Parser.canParse(jeName.toLowerCase())) {
InputStream inputStream = jf.getInputStream(je);
File copyFile = new File(file, jeName);
+ if (!copyFile.toPath().normalize().startsWith(file.toPath().normalize())) {
+ throw new IOException("Bad zip entry");
+ }
Files.copyFile(inputStream, copyFile);
if (matchesXmlPathInJar(je)) {
suitePath = copyFile.toString();

135
testng-build.xml Normal file
View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="testng" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="org.testng"/>
<property name="project.artifactId" value="testng"/>
<property name="project.name" value="TestNG"/>
<property name="project.version" value="7.4.0"/>
<property name="project.description" value="TestNG is a testing framework."/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<!-- ant beust-jcommander bsh2/bsh google-guice jsr-305 junit snakeyaml -->
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
encoding="utf-8"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
encoding="utf-8"
linksource="false"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Bundle-Description" value="${project.description}"/>
<attribute name="Bundle-License" value="http://apache.org/licenses/LICENSE-2.0"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="${project.name}"/>
<attribute name="Bundle-SymbolicName" value="${project.groupId}"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="com.beust.testng;uses:=&quot;org.testng&quot;;version=&quot;${project.version}&quot;,org.testng;uses:=&quot;com.beust.jcommander,com.beust.jcommander.converters,com.google.inject,javax.xml.parsers,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.apache.tools.ant.types,org.testng.annotations,org.testng.internal,org.testng.internal.annotations,org.testng.internal.junit,org.testng.internal.thread.graph,org.testng.xml,org.xml.sax&quot;;version=&quot;${project.version}&quot;,org.testng.annotations;uses:=&quot;com.google.inject,org.testng,org.testng.internal.annotations&quot;;version=&quot;${project.version}&quot;,org.testng.asserts;version=&quot;${project.version}&quot;,org.testng.collections;version=&quot;${project.version}&quot;,org.testng.internal;uses:=&quot;com.google.inject,javax.annotation,org.testng,org.testng.annotations,org.testng.collections,org.testng.internal.annotations,org.testng.internal.thread,org.testng.internal.thread.graph,org.testng.junit,org.testng.reporters,org.testng.xml&quot;;version=&quot;${project.version}&quot;,org.testng.internal.annotations;uses:=&quot;org.testng,org.testng.annotations,org.testng.internal,org.testng.xml&quot;;version=&quot;${project.version}&quot;,org.testng.internal.collections;version=&quot;${project.version}&quot;,org.testng.internal.invokers;uses:=&quot;org.testng&quot;;version=&quot;${project.version}&quot;,org.testng.internal.junit;version=&quot;${project.version}&quot;,org.testng.internal.reflect;uses:=&quot;org.testng&quot;;version=&quot;${project.version}&quot;,org.testng.internal.thread;version=&quot;${project.version}&quot;,org.testng.internal.thread.graph;uses:=&quot;org.testng,org.testng.internal&quot;;version=&quot;${project.version}&quot;,org.testng.junit;uses:=&quot;junit.framework,org.junit.runner,org.testng,org.testng.internal,org.testng.internal.annotations,org.testng.xml&quot;;version=&quot;${project.version}&quot;,org.testng.log;version=&quot;${project.version}&quot;,org.testng.log4testng;version=&quot;${project.version}&quot;,org.testng.mustache;version=&quot;${project.version}&quot;,org.testng.reporters;uses:=&quot;javax.annotation,org.testng,org.testng.internal,org.testng.xml&quot;;version=&quot;${project.version}&quot;,org.testng.reporters.jq;uses:=&quot;org.testng,org.testng.reporters,org.testng.xml&quot;;version=&quot;${project.version}&quot;,org.testng.reporters.util;uses:=&quot;org.testng&quot;;version=&quot;${project.version}&quot;,org.testng.util;uses:=&quot;org.testng&quot;;version=&quot;${project.version}&quot;,org.testng.xml;uses:=&quot;org.testng,org.testng.reporters,org.testng.xml.dom,org.xml.sax,org.xml.sax.helpers&quot;;version=&quot;${project.version}&quot;,org.testng.xml.dom;uses:=&quot;javax.xml.parsers,javax.xml.xpath,org.testng,org.testng.internal.collections,org.testng.xml,org.w3c.dom,org.xml.sax&quot;;version=&quot;${project.version}&quot;,org.testng.xml.internal;uses:=&quot;org.testng.xml&quot;;version=&quot;${project.version}&quot;"/>
<attribute name="Import-Package" value="com.beust.jcommander;version=&quot;[1.7.0,3.0.0)&quot;,com.beust.jcommander.converters;version=&quot;[1.7.0,3.0.0)&quot;,bsh;version=&quot;[2.0.0,3.0.0)&quot;;resolution:=optional,com.google.inject;version=&quot;[1.2,1.3)&quot;;resolution:=optional,junit.framework;version=&quot;[3.8.1,5.0.0)&quot;;resolution:=optional,org.junit;resolution:=optional;version=&quot;[4.12,5)&quot;,org.junit.runner;resolution:=optional;version=&quot;[4.12,5)&quot;,org.junit.runner.manipulation;resolution:=optional;version=&quot;[4.12,5)&quot;,org.junit.runner.notification;resolution:=optional;version=&quot;[4.12,5)&quot;,org.apache.tools.ant;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional,org.apache.tools.ant.taskdefs;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional,org.apache.tools.ant.types;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional,org.apache.tools.ant.types.resources;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional,org.apache.tools.ant.types.selectors;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional,org.yaml.snakeyaml;version=&quot;[1.6,2.0)&quot;;resolution:=optional,org.yaml.snakeyaml.constructor;version=&quot;[1.6,2.0)&quot;;resolution:=optional,org.yaml.snakeyaml.nodes;version=&quot;[1.6,2.0)&quot;;resolution:=optional,javax.annotation,javax.xml.parsers,javax.xml.xpath,org.w3c.dom,org.xml.sax,org.xml.sax.helpers"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

103
testng.changes Normal file
View File

@ -0,0 +1,103 @@
-------------------------------------------------------------------
Tue Nov 22 12:13:04 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* testng-CVE-2022-4065.patch
+ Issues in sanitization of zip files could lead to path
traversal and potentially code execution (bsc#1205628,
CVE-2022-4065)
-------------------------------------------------------------------
Wed Apr 27 13:42:54 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 7.4.0
* Features:
+ Ability to be notified when a data provider fails, through
a TestNG listener.
TestNG already has a listener that will let you plug in your
callbacks for the following with respect to a data provider
(implement org.testng.IDataProviderListener interface)
You can now use this listener to be notified when a data
provider fails as well.
+ Add the ability to override explicitly included test methods
if they belong to any excluded groups via the configuration
property : overrideIncludedMethods
+ Reduced memory foot print when trying to run tests with
larger projects.
This is now a toggle feature which can be enabled via the
JVM argument: -Dtestng.memory.friendly=true
* Bug fixes:
+ GITHUB-2459: Support configurable start time - emailable
report
+ GITHUB-2467: XmlTest does not copy the xmlClasses during clone
+ GITHUB-2469: Parameters added in XmlTest during
AlterSuiteListener not available in SuiteListener
+ GITHUB-2296: Fix for assertEquals not working for sets as
order is not guaranteed
+ GITHUB-2465: Fix bux where Strings.join returns empty String
+ GITHUB-1632: throwing SkipException sets iTestResult status to
Failure instead of Skip
+ GITHUB-2456: Add onDataProviderFailure listener
+ GITHUB-2445: NPE in FailedReporter.java With Tests Created in
Factory
+ GITHUB-2428: Configuration methods have the same test class
instance when @Factory is being used
+ GITHUB-2440: Fixed an issue when case timeout returned an
incorrect exception and effect the next other test case
+ GITHUB-2407: Adds "overrideIncludedMethods" to the global
config as a command-line argument, which excludes explicitly
included test methods if they belong to any excluded groups
+ GITHUB-2432: Rework MethodInheritance.fixMethodInheritance to
"soft" dependencies
+ GITHUB-2429: Seggregate Dependency Injection out as a clear
implementation
+ GITHUB-2435: getParameterIndex() always return 0 in test
listener
+ GITHUB-2406: TestNG 7.3.0 transitive vulnerability
CVE-2020-11022 and CVE-2020-11023 due to JQuery 3.4.1
+ GITHUB-2405: Regression: Using TestNG via Maven breaks when
optional Guice dependency is unavailable
+ GITHUB-2427: Guice module (suite parent-module and test
module) configure() method is called multiple times
+ GITHUB-2419: TestNG JUnit reports are not valid if system
output contains XML tags
+ GITHUB-188: suite parallel="methods" does not work when there
are multiple <test> tags in the testng.xml
+ GITHUB-346: When a method is annotated with both BeforeGroups
and AfterGroups only AfterGroup is executed
+ GITHUB-2403: Suite.xml files attempt to make web request when
suite references standard TestNG DTD using HTTP
+ GITHUB-2385: Make @Listeners can work for implemented
interfaces and Inherited class
+ GITHUB-2053: MethodHelper.collectAndOrderMethods() Hangs when
Parallel Instance and dependsOnGroups
+ GITHUB-2400: BeforeClass/Method (and AfterClass/Method)
configuration methods that override default methods are
invoked multiple times
+ GITHUB-2396: @Ignore on method level doesn't work as expected
+ GITHUB-2382: TestNG version should be specified in MANIFEST.MF
+ GITHUB-2096: 7.0.0-beta6 memory issues (regression)
+ GITHUB-2355: TestNG creates multiple Guice Module Instances
+ GITHUB-2374: Add file name to the warning message
+ GITHUB-2321: -Dtestng.thread.affinity=true do not work when
running multiple instance of test in parallel
+ GITHUB-2363: JS error when switching theme
+ GITHUB-2361: No way to enforce @Test(singleThreaded = true)
when test defined in base class
+ GITHUB-2343: Injectors are not reused when they share the same
set of modules
+ GITHUB-2346: ITestResult attributes are null when retrieved by
Listener onTestStart if test fails at BeforeMethod
+ GITHUB-2357: TestNG 7.3.0 transitive dependencies
- Fetch sources using source service instead of a script
- Build with java source and target levels 8
- Modified patches:
* 0001-Avoid-accidental-javascript-in-javadoc.patch
* 0002-Replace-bundled-jquery-with-CDN-link.patch
+ Rediff to changed context
-------------------------------------------------------------------
Sun Mar 17 12:17:58 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of testng 6.14.3
- Generate and customize ant build.xml file

112
testng.spec Normal file
View File

@ -0,0 +1,112 @@
#
# spec file for package testng
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: testng
Version: 7.4.0
Release: 0
Summary: Java-based testing framework
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://testng.org/
Source0: %{name}-%{version}.tar.xz
Source1: pom.xml
Source2: %{name}-build.xml
Patch0: 0001-Avoid-accidental-javascript-in-javadoc.patch
Patch1: 0002-Replace-bundled-jquery-with-CDN-link.patch
Patch2: testng-CVE-2022-4065.patch
BuildRequires: ant
BuildRequires: beust-jcommander
BuildRequires: bsh2
BuildRequires: fdupes
BuildRequires: google-guice
BuildRequires: javapackages-local
BuildRequires: jsr-305
BuildRequires: junit
BuildRequires: snakeyaml
Requires: mvn(com.beust:jcommander)
Requires: mvn(org.yaml:snakeyaml)
BuildArch: noarch
%description
TestNG is a testing framework inspired from JUnit and NUnit but introducing
some new functionality, including flexible test configuration, and
distributed test running. It is designed to cover unit tests as well as
functional, end-to-end, integration, etc.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed 's/@VERSION@/%{version}/' %{SOURCE1} > pom.xml
cp %{SOURCE2} build.xml
# remove any bundled libs, but not test resources
find ! -path "*/test/*" -name *.jar -print -delete
find -name *.class -delete
# these are unnecessary
%pom_remove_plugin :maven-gpg-plugin .
%pom_remove_plugin :maven-source-plugin .
%pom_remove_plugin :maven-javadoc-plugin .
sed -i -e 's/DEV-SNAPSHOT/%{version}/' src/main/java/org/testng/internal/Version.java
cp -p ./src/main/java/*.dtd.html ./src/main/resources/.
# jdk15 classifier is used by some other packages
%{mvn_alias} : :::jdk15:
%build
mkdir -p lib
build-jar-repository -s lib ant/ant beust-jcommander bsh2/bsh google-guice jsr305 junit snakeyaml
%{ant} jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a org.testng:testng::jdk15:
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc CHANGES.txt README.md
%license LICENSE.txt
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.txt
%changelog