[testng] 02/160: allow '-testnames' option to work with '-xmlpathinjar'
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:22:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag testng-6.9.5
in repository testng.
commit c3357fa44f3596ab9cdf5732b834b0492f135611
Author: William Kemper <doohick at gmail.com>
Date: Thu Jul 3 11:02:01 2014 -0700
allow '-testnames' option to work with '-xmlpathinjar'
---
src/main/java/org/testng/TestNG.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/testng/TestNG.java b/src/main/java/org/testng/TestNG.java
index 35844c1..8059738 100644
--- a/src/main/java/org/testng/TestNG.java
+++ b/src/main/java/org/testng/TestNG.java
@@ -376,7 +376,16 @@ public class TestNG {
JarEntry je = entries.nextElement();
if (je.getName().equals(m_xmlPathInJar)) {
Parser parser = getParser(jf.getInputStream(je));
- m_suites.addAll(parser.parse());
+ Collection<XmlSuite> suites = parser.parse();
+ for (XmlSuite suite : suites) {
+ // If test names were specified, only run these test names
+ if (m_testNames != null) {
+ m_suites.add(extractTestNames(suite, m_testNames));
+ } else {
+ m_suites.add(suite);
+ }
+ }
+
foundTestngXml = true;
break;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list