Author: pete.muir(a)jboss.org
Date: 2009-01-09 16:18:35 -0500 (Fri, 09 Jan 2009)
New Revision: 864
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/ri/
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ManagersImpl.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/TCKRunner.java
ri/trunk/webbeans-ri/testng.xml
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java
Log:
repackage tck tests, add ability to set output dir
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck (from rev 863,
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/ri)
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/ri/BeansImpl.java 2009-01-09
17:27:59 UTC (rev 863)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.tck.ri;
+package org.jboss.webbeans.test.tck;
import java.lang.reflect.Method;
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/ri/ContextsImpl.java 2009-01-09
17:27:59 UTC (rev 863)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.tck.ri;
+package org.jboss.webbeans.test.tck;
import org.jboss.webbeans.context.AbstractContext;
import org.jboss.webbeans.context.RequestContext;
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ManagersImpl.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/ri/ManagersImpl.java 2009-01-09
17:27:59 UTC (rev 863)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ManagersImpl.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.tck.ri;
+package org.jboss.webbeans.test.tck;
import java.lang.annotation.Annotation;
import java.util.List;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/TCKRunner.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/ri/TCKRunner.java 2009-01-09
17:27:59 UTC (rev 863)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/TCKRunner.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -1,6 +1,7 @@
-package org.jboss.webbeans.tck.ri;
+package org.jboss.webbeans.test.tck;
import org.jboss.webbeans.tck.api.TCKConfiguration;
+import org.jboss.webbeans.tck.api.TestSuite;
import org.jboss.webbeans.tck.api.WebBeansTCK;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -13,7 +14,7 @@
@BeforeClass
public void beforeClass()
{
- TCKConfiguration configuration = new TCKConfiguration(new BeansImpl(), new
ContextsImpl(), new ManagersImpl());
+ TCKConfiguration configuration = new TCKConfiguration(new BeansImpl(), new
ContextsImpl(), new ManagersImpl(), new TestSuite("target/surefire-reports"));
tck = WebBeansTCK.newInstance(configuration);
}
Modified: ri/trunk/webbeans-ri/testng.xml
===================================================================
--- ri/trunk/webbeans-ri/testng.xml 2009-01-09 17:27:59 UTC (rev 863)
+++ ri/trunk/webbeans-ri/testng.xml 2009-01-09 21:18:35 UTC (rev 864)
@@ -33,6 +33,7 @@
</run>
</groups>
<packages>
+ <package name="org.jboss.webbeans.test.tck"></package>
<package name="org.jboss.webbeans.test"></package>
<package
name="org.jboss.webbeans.test.contexts"></package>
<package name="org.jboss.webbeans.examples"></package>
Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java
===================================================================
---
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java 2009-01-09
17:27:59 UTC (rev 863)
+++
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -8,13 +8,16 @@
private Contexts<?> contexts;
private Managers managers;
+
+ private TestSuite testSuite;
- public TCKConfiguration(Beans beans, Contexts<?> contexts, Managers managers)
+ public TCKConfiguration(Beans beans, Contexts<?> contexts, Managers managers,
TestSuite testSuite)
{
super();
this.beans = beans;
this.contexts = contexts;
this.managers = managers;
+ this.testSuite = testSuite;
}
public Beans getBeans()
@@ -32,4 +35,9 @@
return managers;
}
+ public TestSuite getTestSuite()
+ {
+ return testSuite;
+ }
+
}
Added: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java
(rev 0)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.api;
+
+public class TestSuite
+{
+
+ private String outputDirectory;
+
+ public TestSuite(String outputDirectory)
+ {
+ super();
+ this.outputDirectory = outputDirectory;
+ }
+
+ public String getOutputDirectory()
+ {
+ return outputDirectory;
+ }
+
+}
Property changes on:
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java 2009-01-09
17:27:59 UTC (rev 863)
+++
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -29,6 +29,10 @@
{
TestNG testNG = new TestNG();
setXmlSuitePath(testNG);
+ if (configuration.getTestSuite().getOutputDirectory() != null)
+ {
+ testNG.setOutputDirectory(configuration.getTestSuite().getOutputDirectory());
+ }
testNG.run();
return !(testNG.hasFailure() || testNG.hasSkip());
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java 2009-01-09
17:27:59 UTC (rev 863)
+++
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java 2009-01-09
21:18:35 UTC (rev 864)
@@ -28,7 +28,7 @@
@BeforeMethod
public final void before()
{
- manager = WebBeansTCKImpl.configuration.getManagers().getManager();
+ manager = WebBeansTCKImpl.configuration.getManagers().createManager();
WebBeansTCKImpl.configuration.getManagers().setEnabledDeploymentTypes(Arrays.asList(Standard.class,
Production.class, AnotherDeploymentType.class));
}
Show replies by date