You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by be...@apache.org on 2008/03/14 21:10:41 UTC
svn commit: r637240 [3/7] - in /maven/surefire/trunk:
maven-surefire-plugin/src/site/apt/examples/
maven-surefire-report-plugin/src/test/resources/test-reports/
surefire-api/src/site/apt/
surefire-api/src/test/java/org/apache/maven/surefire/report/ sur...
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java Fri Mar 14 13:10:25 2008
@@ -1,32 +1,32 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test TestNG running in the JDK 1.4 JavaDoc style
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestNgJdk14Test
- extends TestCase
-{
- public void testTestNgJdk14 ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-jdk14" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
-
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test TestNG running in the JDK 1.4 JavaDoc style
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestNgJdk14Test
+ extends TestCase
+{
+ public void testTestNgJdk14 ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-jdk14" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java Fri Mar 14 13:10:25 2008
@@ -1,40 +1,40 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test simple TestNG listener and reporter
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestNgListenerReporter
- extends TestCase
-{
- public void testTestNgListenerReporter ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-listener-reporter" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- File targetDir = new File( testDir, "target" );
- assertFileExists ( new File( targetDir, "resultlistener-output.txt" ) );
- assertFileExists ( new File( targetDir, "suitelistener-output.txt" ) );
- assertFileExists ( new File( targetDir, "reporter-output.txt" ) );
- }
-
- private void assertFileExists( File file )
- {
- assertTrue( "File doesn't exist: " + file.getAbsolutePath(), file.exists() );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test simple TestNG listener and reporter
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestNgListenerReporter
+ extends TestCase
+{
+ public void testTestNgListenerReporter ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-listener-reporter" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ File targetDir = new File( testDir, "target" );
+ assertFileExists ( new File( targetDir, "resultlistener-output.txt" ) );
+ assertFileExists ( new File( targetDir, "suitelistener-output.txt" ) );
+ assertFileExists ( new File( targetDir, "reporter-output.txt" ) );
+ }
+
+ private void assertFileExists( File file )
+ {
+ assertTrue( "File doesn't exist: " + file.getAbsolutePath(), file.exists() );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java Fri Mar 14 13:10:25 2008
@@ -1,31 +1,31 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test TestNG test in a directory with spaces
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestNgPathWithSpaces
- extends TestCase
-{
- public void testTestNgTestWithSpaces ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-path with spaces" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test TestNG test in a directory with spaces
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestNgPathWithSpaces
+ extends TestCase
+{
+ public void testTestNgTestWithSpaces ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-path with spaces" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java Fri Mar 14 13:10:25 2008
@@ -1,33 +1,33 @@
-package org.apache.maven.surefire.its;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test surefire-report on TestNG test
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestNgReportTest
- extends TestCase
-{
- public void testTestNgReport ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "surefire-report:report" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- File reportHtml = new File(testDir, "target/site/surefire-report.html");
- Assert.assertTrue( "surefire-report is missing", reportHtml.exists() );
- }
-}
+package org.apache.maven.surefire.its;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test surefire-report on TestNG test
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestNgReportTest
+ extends TestCase
+{
+ public void testTestNgReport ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "surefire-report:report" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ File reportHtml = new File(testDir, "target/site/surefire-report.html");
+ Assert.assertTrue( "surefire-report is missing", reportHtml.exists() );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java Fri Mar 14 13:10:25 2008
@@ -1,31 +1,31 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test simple TestNG suite XML file
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestNgSuiteXmlTest
- extends TestCase
-{
- public void testTestNgSuiteXml ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-suite-xml" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test simple TestNG suite XML file
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestNgSuiteXmlTest
+ extends TestCase
+{
+ public void testTestNgSuiteXml ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-suite-xml" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java Fri Mar 14 13:10:25 2008
@@ -1,82 +1,82 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Basic suite test using all known versions of TestNG
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestNgVersionsTest
- extends TestCase
-{
-
- public void test47 () throws Exception
- {
- runTestNgTest( "4.7" );
- }
-
- // DGF SUREFIRE-375 + MAVENUPLOAD-1024
- // The 5.0 and 5.0.1 jars on central are malformed
- public void XXXtest50 () throws Exception
- {
- runTestNgTest( "5.0" );
- }
-
- public void XXXtest501 () throws Exception
- {
- runTestNgTest( "5.0.1" );
- }
-
- public void test502 () throws Exception
- {
- runTestNgTest( "5.0.2" );
- }
-
- public void test51 () throws Exception
- {
- runTestNgTest( "5.1" );
- }
-
- public void test55 () throws Exception
- {
- runTestNgTest( "5.5" );
- }
-
- public void test56 () throws Exception
- {
- runTestNgTest( "5.6" );
- }
-
- public void test57 () throws Exception
- {
- runTestNgTest( "5.7" );
- }
-
- public void runTestNgTest (String version)
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List arguments = new ArrayList();
- arguments.add( "test" );
- // DGF we have to pass in the version as a command line argument
- // and NOT as a system property; otherwise our setting will be ignored
- arguments.add( "-DtestNgVersion=" + version );
- verifier.executeGoals( arguments );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- ITSuiteResults suite = HelperAssertions.parseTestResults( testDir );
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, suite );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Basic suite test using all known versions of TestNG
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestNgVersionsTest
+ extends TestCase
+{
+
+ public void test47 () throws Exception
+ {
+ runTestNgTest( "4.7" );
+ }
+
+ // DGF SUREFIRE-375 + MAVENUPLOAD-1024
+ // The 5.0 and 5.0.1 jars on central are malformed
+ public void XXXtest50 () throws Exception
+ {
+ runTestNgTest( "5.0" );
+ }
+
+ public void XXXtest501 () throws Exception
+ {
+ runTestNgTest( "5.0.1" );
+ }
+
+ public void test502 () throws Exception
+ {
+ runTestNgTest( "5.0.2" );
+ }
+
+ public void test51 () throws Exception
+ {
+ runTestNgTest( "5.1" );
+ }
+
+ public void test55 () throws Exception
+ {
+ runTestNgTest( "5.5" );
+ }
+
+ public void test56 () throws Exception
+ {
+ runTestNgTest( "5.6" );
+ }
+
+ public void test57 () throws Exception
+ {
+ runTestNgTest( "5.7" );
+ }
+
+ public void runTestNgTest (String version)
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ List arguments = new ArrayList();
+ arguments.add( "test" );
+ // DGF we have to pass in the version as a command line argument
+ // and NOT as a system property; otherwise our setting will be ignored
+ arguments.add( "-DtestNgVersion=" + version );
+ verifier.executeGoals( arguments );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ ITSuiteResults suite = HelperAssertions.parseTestResults( testDir );
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, suite );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java Fri Mar 14 13:10:25 2008
@@ -1,101 +1,101 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Test running a single test with -Dtest=BasicTest
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestSingleTest
- extends TestCase
-{
- public void testSingleTest ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List goals = new ArrayList();
- goals.add( "test" );
- goals.add( "-Dtest=BasicTest" );
- verifier.executeGoals( goals );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-
- public void testSingleTestDotJava()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List goals = new ArrayList();
- goals.add( "test" );
- goals.add( "-Dtest=BasicTest.java" );
- verifier.executeGoals( goals );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-
- public void testSingleTestNonExistent()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List goals = new ArrayList();
- goals.add( "test" );
- goals.add( "-Dtest=DoesNotExist" );
-
- try
- {
- verifier.executeGoals( goals );
- verifier.verifyErrorFreeLog();
- fail( "Build should have failed" );
- }
- catch ( VerificationException e )
- {
- // as expected
- }
- finally
- {
- verifier.resetStreams();
- }
-
- File reportsDir = new File( testDir, "target/surefire-reports" );
- assertFalse ( "Unexpected reports directory", reportsDir.exists() );
- }
-
- public void testSingleTestNonExistentOverride()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List goals = new ArrayList();
- goals.add( "test" );
- goals.add( "-Dtest=DoesNotExist" );
- goals.add( "-DfailIfNoTests=false" );
- verifier.executeGoals( goals );
-
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- File reportsDir = new File( testDir, "target/surefire-reports" );
- assertFalse ( "Unexpected reports directory", reportsDir.exists() );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Test running a single test with -Dtest=BasicTest
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestSingleTest
+ extends TestCase
+{
+ public void testSingleTest ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ List goals = new ArrayList();
+ goals.add( "test" );
+ goals.add( "-Dtest=BasicTest" );
+ verifier.executeGoals( goals );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+
+ public void testSingleTestDotJava()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ List goals = new ArrayList();
+ goals.add( "test" );
+ goals.add( "-Dtest=BasicTest.java" );
+ verifier.executeGoals( goals );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+
+ public void testSingleTestNonExistent()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ List goals = new ArrayList();
+ goals.add( "test" );
+ goals.add( "-Dtest=DoesNotExist" );
+
+ try
+ {
+ verifier.executeGoals( goals );
+ verifier.verifyErrorFreeLog();
+ fail( "Build should have failed" );
+ }
+ catch ( VerificationException e )
+ {
+ // as expected
+ }
+ finally
+ {
+ verifier.resetStreams();
+ }
+
+ File reportsDir = new File( testDir, "target/surefire-reports" );
+ assertFalse ( "Unexpected reports directory", reportsDir.exists() );
+ }
+
+ public void testSingleTestNonExistentOverride()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ List goals = new ArrayList();
+ goals.add( "test" );
+ goals.add( "-Dtest=DoesNotExist" );
+ goals.add( "-DfailIfNoTests=false" );
+ verifier.executeGoals( goals );
+
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ File reportsDir = new File( testDir, "target/surefire-reports" );
+ assertFalse ( "Unexpected reports directory", reportsDir.exists() );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java Fri Mar 14 13:10:25 2008
@@ -1,31 +1,31 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test useSystemClassLoader option
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TestUseIsolatedClassLoader
- extends TestCase
-{
- public void testUseSystemClassLoader ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/isolated-classloader" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test useSystemClassLoader option
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TestUseIsolatedClassLoader
+ extends TestCase
+{
+ public void testUseSystemClassLoader ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/isolated-classloader" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java Fri Mar 14 13:10:25 2008
@@ -1,41 +1,41 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * Test
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class TimeoutForkedTest
- extends TestCase
-{
- public void testTimeoutForked ()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/timeout-forked" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- try {
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- fail( "Build didn't fail, but it should have" );
- } catch (VerificationException e)
- {
- // as expected
- }
- finally
- {
- verifier.resetStreams();
- }
-
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * Test
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class TimeoutForkedTest
+ extends TestCase
+{
+ public void testTimeoutForked ()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/timeout-forked" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+
+ try {
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ fail( "Build didn't fail, but it should have" );
+ } catch (VerificationException e)
+ {
+ // as expected
+ }
+ finally
+ {
+ verifier.resetStreams();
+ }
+
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java Fri Mar 14 13:10:25 2008
@@ -1,110 +1,110 @@
-package org.apache.maven.surefire.its;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.plugins.surefire.report.ReportTestSuite;
-
-/**
- * Test running two test cases; confirms reporting works correctly
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- */
-public class TwoTestCasesTest
- extends TestCase
-{
- public void testTwoTestCases()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-twoTestCases" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
- }
-
- /** Runs two tests encapsulated in a suite */
- public void testTwoTestCaseSuite()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-twoTestCaseSuite" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
- List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
- Set classNames = extractClassNames( reports );
- assertContains( classNames, "junit.twoTestCaseSuite.BasicTest" );
- assertContains( classNames, "junit.twoTestCaseSuite.TestTwo" );
- assertEquals( "wrong number of classes", 2, classNames.size() );
- ITSuiteResults results = HelperAssertions.parseReportList( reports );
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
- }
-
- private void assertContains( Set set, String expected )
- {
- if ( set.contains( expected ) ) return;
- fail( "Set didn't contain " + expected );
- }
-
- private Set extractClassNames( List reports )
- {
- ReportTestSuite suite;
- HashSet classNames = new HashSet();
- for ( int i = 0; i < reports.size(); i++ )
- {
- suite = (ReportTestSuite) reports.get( i );
- classNames.add( suite.getFullClassName() );
- }
- return classNames;
- }
-
- public void testJunit4Suite()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit4-twoTestCaseSuite" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
- Set classNames = extractClassNames( reports );
- assertContains( classNames, "twoTestCaseSuite.BasicTest" );
- assertContains( classNames, "twoTestCaseSuite.Junit4TestTwo" );
- assertEquals( "wrong number of classes", 2, classNames.size() );
- ITSuiteResults results = HelperAssertions.parseReportList( reports );
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
- }
-
- public void testTestNGSuite()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-twoTestCaseSuite" );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
- Set classNames = extractClassNames( reports );
- assertContains( classNames, "testng.two.TestNGTestTwo" );
- assertContains( classNames, "testng.two.TestNGSuiteTest" );
- assertEquals( "wrong number of classes", 2, classNames.size() );
- ITSuiteResults results = HelperAssertions.parseReportList( reports );
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
- }
-
-}
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.plugins.surefire.report.ReportTestSuite;
+
+/**
+ * Test running two test cases; confirms reporting works correctly
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ */
+public class TwoTestCasesTest
+ extends TestCase
+{
+ public void testTwoTestCases()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-twoTestCases" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
+ }
+
+ /** Runs two tests encapsulated in a suite */
+ public void testTwoTestCaseSuite()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-twoTestCaseSuite" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+ List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
+ Set classNames = extractClassNames( reports );
+ assertContains( classNames, "junit.twoTestCaseSuite.BasicTest" );
+ assertContains( classNames, "junit.twoTestCaseSuite.TestTwo" );
+ assertEquals( "wrong number of classes", 2, classNames.size() );
+ ITSuiteResults results = HelperAssertions.parseReportList( reports );
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
+ }
+
+ private void assertContains( Set set, String expected )
+ {
+ if ( set.contains( expected ) ) return;
+ fail( "Set didn't contain " + expected );
+ }
+
+ private Set extractClassNames( List reports )
+ {
+ ReportTestSuite suite;
+ HashSet classNames = new HashSet();
+ for ( int i = 0; i < reports.size(); i++ )
+ {
+ suite = (ReportTestSuite) reports.get( i );
+ classNames.add( suite.getFullClassName() );
+ }
+ return classNames;
+ }
+
+ public void testJunit4Suite()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit4-twoTestCaseSuite" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
+ Set classNames = extractClassNames( reports );
+ assertContains( classNames, "twoTestCaseSuite.BasicTest" );
+ assertContains( classNames, "twoTestCaseSuite.Junit4TestTwo" );
+ assertEquals( "wrong number of classes", 2, classNames.size() );
+ ITSuiteResults results = HelperAssertions.parseReportList( reports );
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
+ }
+
+ public void testTestNGSuite()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-twoTestCaseSuite" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
+ Set classNames = extractClassNames( reports );
+ assertContains( classNames, "testng.two.TestNGTestTwo" );
+ assertContains( classNames, "testng.two.TestNGSuiteTest" );
+ assertEquals( "wrong number of classes", 2, classNames.size() );
+ ITSuiteResults results = HelperAssertions.parseReportList( reports );
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
+ }
+
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java Fri Mar 14 13:10:25 2008
@@ -1,62 +1,62 @@
-package org.apache.maven.surefire.its;
-
-
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.FileUtils;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-/**
- * Test a directory with an umlaut
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class UmlautDirTest
- extends TestCase
-{
- File testDir;
-
- public void testUmlaut ()
- throws Exception
- {
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-
- public void testUmlautIsolatedClassLoader ()
- throws Exception
- {
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- ArrayList goals = new ArrayList();
- goals.add( "test" );
- goals.add( "-DuseSystemClassLoader=false" );
- verifier.executeGoals( goals );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- }
-
- public void setUp()
- throws IOException
- {
- String tempDirPath = System.getProperty( "maven.test.tmpdir", System.getProperty( "java.io.tmpdir" ) );
- File tempDir = new File(tempDirPath);
- File targetDir = new File("target").getAbsoluteFile();
- if (targetDir.exists() && targetDir.isDirectory()) {
- tempDir = targetDir;
- }
- testDir = new File( tempDir, "/junit-pathWith\u00DCmlaut" );
- FileUtils.deleteDirectory( testDir );
- testDir = ResourceExtractor.extractResourcePath(getClass(), "/junit-pathWithUmlaut", testDir, true);
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import junit.framework.TestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.FileUtils;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+/**
+ * Test a directory with an umlaut
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class UmlautDirTest
+ extends TestCase
+{
+ File testDir;
+
+ public void testUmlaut ()
+ throws Exception
+ {
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+
+ public void testUmlautIsolatedClassLoader ()
+ throws Exception
+ {
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ ArrayList goals = new ArrayList();
+ goals.add( "test" );
+ goals.add( "-DuseSystemClassLoader=false" );
+ verifier.executeGoals( goals );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+ }
+
+ public void setUp()
+ throws IOException
+ {
+ String tempDirPath = System.getProperty( "maven.test.tmpdir", System.getProperty( "java.io.tmpdir" ) );
+ File tempDir = new File(tempDirPath);
+ File targetDir = new File("target").getAbsoluteFile();
+ if (targetDir.exists() && targetDir.isDirectory()) {
+ tempDir = targetDir;
+ }
+ testDir = new File( tempDir, "/junit-pathWith\u00DCmlaut" );
+ FileUtils.deleteDirectory( testDir );
+ testDir = ResourceExtractor.extractResourcePath(getClass(), "/junit-pathWithUmlaut", testDir, true);
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java Fri Mar 14 13:10:25 2008
@@ -1,108 +1,108 @@
-package org.apache.maven.surefire.its;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-/**
- * Test working directory configuration, SUREFIRE-416
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
- */
-public class WorkingDirectoryTest
- extends TestCase
-{
-
- private File testDir;
- private File childTestDir;
- private File targetDir;
- private File outFile;
-
- public void setUp() throws IOException {
- testDir = ResourceExtractor.simpleExtractResources( getClass(), "/working-directory" );
- childTestDir = new File( testDir, "child" );
- targetDir = new File( childTestDir, "target" );
- outFile = new File( targetDir, "out.txt" );
- outFile.delete();
- }
-
- public void testWorkingDirectory ()
- throws Exception
- {
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
- verifyOutputDirectory( childTestDir );
- }
-
- public void verifyOutputDirectory( File childTestDir )
- throws IOException
- {
- assertTrue( "out.txt doesn't exist: " + outFile.getAbsolutePath(), outFile.exists() );
- Properties p = new Properties();
- FileInputStream is = new FileInputStream( outFile );
- p.load( is );
- is.close();
- String userDirPath = p.getProperty( "user.dir" );
- assertNotNull( "user.dir was null in property file", userDirPath );
- File userDir = new File( userDirPath );
- assertEquals( "wrong user.dir", childTestDir.getAbsolutePath(), userDir.getAbsolutePath() );
- }
-
- public void testWorkingDirectoryNoFork()
- throws Exception
- {
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- ArrayList goals = new ArrayList();
- goals.add( "test");
- goals.add( "-DforkMode=never" );
- verifier.executeGoals( goals );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
- verifyOutputDirectory( childTestDir );
- }
-
- public void testWorkingDirectoryChildOnly()
- throws Exception
- {
- Verifier verifier = new Verifier( childTestDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
- verifyOutputDirectory( childTestDir );
- }
-
-
-
- public void testWorkingDirectoryChildOnlyNoFork()
- throws Exception
- {
-
- Verifier verifier = new Verifier( childTestDir.getAbsolutePath() );
- ArrayList goals = new ArrayList();
- goals.add( "test");
- goals.add( "-DforkMode=never" );
- verifier.executeGoals( goals );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
- verifyOutputDirectory( childTestDir );
- }
-}
+package org.apache.maven.surefire.its;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test working directory configuration, SUREFIRE-416
+ *
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ *
+ */
+public class WorkingDirectoryTest
+ extends TestCase
+{
+
+ private File testDir;
+ private File childTestDir;
+ private File targetDir;
+ private File outFile;
+
+ public void setUp() throws IOException {
+ testDir = ResourceExtractor.simpleExtractResources( getClass(), "/working-directory" );
+ childTestDir = new File( testDir, "child" );
+ targetDir = new File( childTestDir, "target" );
+ outFile = new File( targetDir, "out.txt" );
+ outFile.delete();
+ }
+
+ public void testWorkingDirectory ()
+ throws Exception
+ {
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
+ verifyOutputDirectory( childTestDir );
+ }
+
+ public void verifyOutputDirectory( File childTestDir )
+ throws IOException
+ {
+ assertTrue( "out.txt doesn't exist: " + outFile.getAbsolutePath(), outFile.exists() );
+ Properties p = new Properties();
+ FileInputStream is = new FileInputStream( outFile );
+ p.load( is );
+ is.close();
+ String userDirPath = p.getProperty( "user.dir" );
+ assertNotNull( "user.dir was null in property file", userDirPath );
+ File userDir = new File( userDirPath );
+ assertEquals( "wrong user.dir", childTestDir.getAbsolutePath(), userDir.getAbsolutePath() );
+ }
+
+ public void testWorkingDirectoryNoFork()
+ throws Exception
+ {
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ ArrayList goals = new ArrayList();
+ goals.add( "test");
+ goals.add( "-DforkMode=never" );
+ verifier.executeGoals( goals );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
+ verifyOutputDirectory( childTestDir );
+ }
+
+ public void testWorkingDirectoryChildOnly()
+ throws Exception
+ {
+ Verifier verifier = new Verifier( childTestDir.getAbsolutePath() );
+ verifier.executeGoal( "test" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
+ verifyOutputDirectory( childTestDir );
+ }
+
+
+
+ public void testWorkingDirectoryChildOnlyNoFork()
+ throws Exception
+ {
+
+ Verifier verifier = new Verifier( childTestDir.getAbsolutePath() );
+ ArrayList goals = new ArrayList();
+ goals.add( "test");
+ goals.add( "-DforkMode=never" );
+ verifier.executeGoals( goals );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
+ verifyOutputDirectory( childTestDir );
+ }
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/extraResource/test.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml Fri Mar 14 13:10:25 2008
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<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">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.surefire</groupId>
- <artifactId>additional-classpath</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>Test for additionalClasspathElements</name>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <additionalClasspathElements>
- <additionalClasspathElement>${basedir}/extraResource</additionalClasspathElement>
- </additionalClasspathElements>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>additional-classpath</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for additionalClasspathElements</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/extraResource</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/src/test/java/additionalClasspath/BasicTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/src/test/java/additionalClasspath/BasicTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/src/test/java/additionalClasspath/BasicTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/src/test/java/additionalClasspath/BasicTest.java Fri Mar 14 13:10:25 2008
@@ -1,13 +1,13 @@
-package additionalClasspath;
-
-import junit.framework.TestCase;
-
-public class BasicTest
- extends TestCase
-{
-
- public void testExtraResource() {
- assertNotNull(BasicTest.class.getResourceAsStream("/test.txt"));
- }
-
-}
+package additionalClasspath;
+
+import junit.framework.TestCase;
+
+public class BasicTest
+ extends TestCase
+{
+
+ public void testExtraResource() {
+ assertNotNull(BasicTest.class.getResourceAsStream("/test.txt"));
+ }
+
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/src/test/java/additionalClasspath/BasicTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml Fri Mar 14 13:10:25 2008
@@ -1,48 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<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">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.surefire</groupId>
- <artifactId>aggregate-child1</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>child1 for aggregate-reports</name>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>aggregate-child1</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>child1 for aggregate-reports</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/src/test/java/aggregateReport/FailingTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/src/test/java/aggregateReport/FailingTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/src/test/java/aggregateReport/FailingTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/src/test/java/aggregateReport/FailingTest.java Fri Mar 14 13:10:25 2008
@@ -1,14 +1,14 @@
-package aggregateReport;
-
-import junit.framework.TestCase;
-
-public class FailingTest
- extends TestCase
-{
-
- public void testFailure()
- {
- fail( "This test is supposed to fail" );
- }
-
-}
+package aggregateReport;
+
+import junit.framework.TestCase;
+
+public class FailingTest
+ extends TestCase
+{
+
+ public void testFailure()
+ {
+ fail( "This test is supposed to fail" );
+ }
+
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child1/src/test/java/aggregateReport/FailingTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml Fri Mar 14 13:10:25 2008
@@ -1,48 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<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">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.surefire</groupId>
- <artifactId>aggregate-child2</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>child2 for aggregate-reports</name>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>aggregate-child2</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>child2 for aggregate-reports</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/src/test/java/aggregateReport/BasicTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/src/test/java/aggregateReport/BasicTest.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/src/test/java/aggregateReport/BasicTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/src/test/java/aggregateReport/BasicTest.java Fri Mar 14 13:10:25 2008
@@ -1,69 +1,69 @@
-package aggregateReport;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class BasicTest
- extends TestCase
-{
-
- private boolean setUpCalled = false;
-
- private static boolean tearDownCalled = false;
-
- public BasicTest( String name, String extraName )
- {
- super( name );
- }
-
- public static Test suite()
- {
- System.out.println("suite");
- TestSuite suite = new TestSuite();
- Test test = new BasicTest( "testSetUp", "dummy" );
- suite.addTest( test );
- TestSetup setup = new TestSetup( suite )
- {
-
- protected void setUp()
- {
- //oneTimeSetUp();
- }
-
- protected void tearDown()
- {
- oneTimeTearDown();
- }
-
- };
-
- return setup;
- }
-
- protected void setUp()
- {
- setUpCalled = true;
- tearDownCalled = false;
- System.out.println( "Called setUp" );
- }
-
- protected void tearDown()
- {
- setUpCalled = false;
- tearDownCalled = true;
- System.out.println( "Called tearDown" );
- }
-
- public void testSetUp()
- {
- assertTrue( "setUp was not called", setUpCalled );
- }
-
- public static void oneTimeTearDown()
- {
- assertTrue( "tearDown was not called", tearDownCalled );
- }
-
-}
+package aggregateReport;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class BasicTest
+ extends TestCase
+{
+
+ private boolean setUpCalled = false;
+
+ private static boolean tearDownCalled = false;
+
+ public BasicTest( String name, String extraName )
+ {
+ super( name );
+ }
+
+ public static Test suite()
+ {
+ System.out.println("suite");
+ TestSuite suite = new TestSuite();
+ Test test = new BasicTest( "testSetUp", "dummy" );
+ suite.addTest( test );
+ TestSetup setup = new TestSetup( suite )
+ {
+
+ protected void setUp()
+ {
+ //oneTimeSetUp();
+ }
+
+ protected void tearDown()
+ {
+ oneTimeTearDown();
+ }
+
+ };
+
+ return setup;
+ }
+
+ protected void setUp()
+ {
+ setUpCalled = true;
+ tearDownCalled = false;
+ System.out.println( "Called setUp" );
+ }
+
+ protected void tearDown()
+ {
+ setUpCalled = false;
+ tearDownCalled = true;
+ System.out.println( "Called tearDown" );
+ }
+
+ public void testSetUp()
+ {
+ assertTrue( "setUp was not called", setUpCalled );
+ }
+
+ public static void oneTimeTearDown()
+ {
+ assertTrue( "tearDown was not called", tearDownCalled );
+ }
+
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/child2/src/test/java/aggregateReport/BasicTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml Fri Mar 14 13:10:25 2008
@@ -1,63 +1,63 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<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">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.surefire</groupId>
- <artifactId>aggregate-report</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>Test for aggregate-report</name>
- <packaging>pom</packaging>
- <modules>
- <module>child1</module>
- <module>child2</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <testFailureIgnore>true</testFailureIgnore>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>aggregate-report</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for aggregate-report</name>
+ <packaging>pom</packaging>
+ <modules>
+ <module>child1</module>
+ <module>child2</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <testFailureIgnore>true</testFailureIgnore>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml Fri Mar 14 13:10:25 2008
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<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">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.surefire</groupId>
- <artifactId>testArgLine</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>Test for argLine configuration</name>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Dfoo.property="foo foo/foo/bar/1.0" -Dbar.property="bar bar/foo/bar/2.0"</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>testArgLine</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for argLine configuration</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Dfoo.property="foo foo/foo/bar/1.0" -Dbar.property="bar bar/foo/bar/2.0"</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/argLine/TestSurefireArgLine.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/argLine/TestSurefireArgLine.java?rev=637240&r1=637239&r2=637240&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/argLine/TestSurefireArgLine.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/argLine/TestSurefireArgLine.java Fri Mar 14 13:10:25 2008
@@ -1,21 +1,21 @@
-package argLine;
-
-import junit.framework.TestCase;
-
-public class TestSurefireArgLine
- extends TestCase
-{
-
- public void testArgLine()
- {
- String fooProperty = System.getProperty( "foo.property" );
- assertEquals( "incorrect foo.property; " +
- "Surefire should have passed this in correctly",
- "foo foo/foo/bar/1.0", fooProperty );
- String barProperty = System.getProperty( "bar.property" );
- assertEquals( "incorrect bar.property; " +
- "Surefire should have passed this in correctly",
- "bar bar/foo/bar/2.0", barProperty );
- }
-
-}
+package argLine;
+
+import junit.framework.TestCase;
+
+public class TestSurefireArgLine
+ extends TestCase
+{
+
+ public void testArgLine()
+ {
+ String fooProperty = System.getProperty( "foo.property" );
+ assertEquals( "incorrect foo.property; " +
+ "Surefire should have passed this in correctly",
+ "foo foo/foo/bar/1.0", fooProperty );
+ String barProperty = System.getProperty( "bar.property" );
+ assertEquals( "incorrect bar.property; " +
+ "Surefire should have passed this in correctly",
+ "bar bar/foo/bar/2.0", barProperty );
+ }
+
+}
Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/argLine/TestSurefireArgLine.java
------------------------------------------------------------------------------
svn:eol-style = native