[jboss-cvs] JBoss Messaging SVN: r4060 - in trunk: tests/bin and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 15 09:30:48 EDT 2008
Author: ataylor
Date: 2008-04-15 09:30:48 -0400 (Tue, 15 Apr 2008)
New Revision: 4060
Added:
trunk/tests/src/org/jboss/messaging/tests/util/junit/
trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestRunner.java
trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestSuite.java
Removed:
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestRunner.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestSuite.java
Modified:
trunk/build-messaging.xml
trunk/tests/bin/runtest
Log:
fixed testrunner
Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml 2008-04-15 13:16:52 UTC (rev 4059)
+++ trunk/build-messaging.xml 2008-04-15 13:30:48 UTC (rev 4060)
@@ -344,10 +344,17 @@
<jar jarfile="${build.jars.dir}/jboss-${module.name}-client.jar">
<fileset dir="${build.classes.dir}">
- <!-- TODO This structure is temporary until we partition the classes
- properly between client and server -->
<include name="org/jboss/messaging/jms/**/*.class"/>
<include name="org/jboss/messaging/core/client/**/*.class"/>
+ <include name="org/jboss/messaging/core/exception/**/*.class"/>
+ <include name="org/jboss/messaging/core/logging/**/*.class"/>
+ <include name="org/jboss/messaging/core/remoting/**/*.class"/>
+ <include name="org/jboss/messaging/util/**/*.class"/>
+ <include name="org/jboss/messaging/core/config/**/*.class"/>
+ <include name="org/jboss/messaging/core/list/**/*.class"/>
+ <include name="org/jboss/messaging/core/message/**/*.class"/>
+ <include name="org/jboss/messaging/core/version/**/*.class"/>
+ <include name="org/jboss/messaging/core/server/JournalType.class"/>
</fileset>
</jar>
@@ -436,7 +443,7 @@
<include name="jnpserver.jar"/>
</fileset>
<fileset dir="${apache.mina.lib}">
- <include name="mina-core-2.0.0-M1.jar"/>
+ <include name="mina-core-2.0.0-M2-20080411.122259-16.jar"/>
</fileset>
<fileset dir="${slf4j.api.lib}">
<include name="slf4j-api-1.4.3.jar"/>
@@ -696,4 +703,12 @@
</junitreport>
</target>
+ <property name="test.execution.classpath.file" value=".test.execution.classpath"/>
+
+ <target name="get-test-execution-classpath" depends="init">
+ <pathconvert refid="unit.test.execution.classpath"
+ property="test.execution.classpath.unix"/>
+ <echo message="${test.execution.classpath.unix}" file="${test.execution.classpath.file}"/>
+ </target>
+
</project>
\ No newline at end of file
Modified: trunk/tests/bin/runtest
===================================================================
--- trunk/tests/bin/runtest 2008-04-15 13:16:52 UTC (rev 4059)
+++ trunk/tests/bin/runtest 2008-04-15 13:30:48 UTC (rev 4060)
@@ -56,7 +56,7 @@
# it from there.
#
-ant -Dtest.execution.classpath.file=bin/.test.execution.classpath -f $reldir/../build.xml compile get-test-execution-classpath
+ant -Dtest.execution.classpath.file=tests/bin/.test.execution.classpath -f $reldir/../../build-messaging.xml compile get-test-execution-classpath
CLASSPATH=`cat $reldir/.test.execution.classpath`
outputdir="$reldir/../output"
@@ -175,7 +175,7 @@
fi
"$JAVA_HOME/bin/java" -Xmx1024M $JAVA_OPTS -Djgroups.bind_addr=localhost -cp "$CLASSPATH" \
-org.jboss.test.messaging.tools.junit.SelectiveTestRunner $TARGET_CLASS $TARGET_TEST
+org.jboss.messaging.tests.util.junit.SelectiveTestRunner $TARGET_CLASS $TARGET_TEST
#
# stop the servers in the reverse order
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestRunner.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestRunner.java 2008-04-15 13:16:52 UTC (rev 4059)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestRunner.java 2008-04-15 13:30:48 UTC (rev 4060)
@@ -1,131 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.junit;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import junit.framework.Test;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * A text TestRunner than runs only test methods specified on command line with "-t".
- *
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class SelectiveTestRunner extends TestRunner
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- /**
- * Specify -t testName1,testName2,... somewhere in the argument list.
- */
- public static void main(String[] args)
- {
- SelectiveTestRunner runner = new SelectiveTestRunner();
-
- try
- {
- args = runner.preProcessCommandLine(args);
-
- TestResult r = runner.start(args);
-
- if (!r.wasSuccessful())
- {
- System.exit(FAILURE_EXIT);
- }
- System.exit(SUCCESS_EXIT);
- }
- catch(Exception e)
- {
- System.err.println(e.getMessage());
- System.exit(EXCEPTION_EXIT);
- }
- }
-
- // Attributes ----------------------------------------------------
-
- private List methods = new ArrayList();
-
- // Constructors --------------------------------------------------
-
- // TestRunner overrides ------------------------------------------
-
- public Test getTest(String suiteClassName)
- {
- Test t = super.getTest(suiteClassName);
- if (methods.isEmpty())
- {
- return t;
- }
- else
- {
- return new SelectiveTestSuite((TestSuite)t, methods);
- }
- }
-
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
-
- // Private -------------------------------------------------------
-
- /**
- * Scan command line for an argument of type "-t testMethod1,testMethod2,..." and processes it.
- */
- private String[] preProcessCommandLine(String[] args)
- {
- List l = new ArrayList();
- for (int i = 0; i < args.length; i++)
- {
- if ("-t".equals(args[i]))
- {
- i++;
- for(StringTokenizer st = new StringTokenizer(args[i], ","); st.hasMoreTokens(); )
- {
- methods.add(st.nextToken());
- }
- }
- else
- {
- l.add(args[i]);
- }
- }
-
- String[] a = new String[l.size()];
- return (String[])l.toArray(a);
- }
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestSuite.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestSuite.java 2008-04-15 13:16:52 UTC (rev 4059)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestSuite.java 2008-04-15 13:30:48 UTC (rev 4060)
@@ -1,110 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.junit;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-
-
-/**
- * A TestSuite that filters tests.
- *
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class SelectiveTestSuite extends TestSuite
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private List methods;
- private List tests;
-
- // Constructors --------------------------------------------------
-
- public SelectiveTestSuite(TestSuite original, List methods)
- {
- tests = new ArrayList();
- this.methods = new ArrayList(methods);
- this.methods.add("warning");
-
- for(Enumeration e = original.tests(); e.hasMoreElements();)
- {
- TestCase tc = (TestCase)e.nextElement();
- if (methods.contains(tc.getName()))
- {
- tests.add(tc);
- }
- }
-
- if (tests.isEmpty())
- {
- tests.add(new TestCase("warning")
- {
- protected void runTest()
- {
- fail("The SelectiveTestSuite did not select any test.");
- }
- });
- }
- }
-
-
- // TestSuite overrides -------------------------------------------
-
- public Test testAt(int index)
- {
- return (Test)tests.get(index);
- }
-
- public int testCount()
- {
- return tests.size();
- }
-
- public Enumeration tests()
- {
- return Collections.enumeration(tests);
- }
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Copied: trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestRunner.java (from rev 4054, trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestRunner.java)
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestRunner.java (rev 0)
+++ trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestRunner.java 2008-04-15 13:30:48 UTC (rev 4060)
@@ -0,0 +1,131 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.messaging.tests.util.junit;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import junit.framework.Test;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * A text TestRunner than runs only test methods specified on command line with "-t".
+ *
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public class SelectiveTestRunner extends TestRunner
+{
+ // Constants -----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ /**
+ * Specify -t testName1,testName2,... somewhere in the argument list.
+ */
+ public static void main(String[] args)
+ {
+ SelectiveTestRunner runner = new SelectiveTestRunner();
+
+ try
+ {
+ args = runner.preProcessCommandLine(args);
+
+ TestResult r = runner.start(args);
+
+ if (!r.wasSuccessful())
+ {
+ System.exit(FAILURE_EXIT);
+ }
+ System.exit(SUCCESS_EXIT);
+ }
+ catch(Exception e)
+ {
+ System.err.println(e.getMessage());
+ System.exit(EXCEPTION_EXIT);
+ }
+ }
+
+ // Attributes ----------------------------------------------------
+
+ private List methods = new ArrayList();
+
+ // Constructors --------------------------------------------------
+
+ // TestRunner overrides ------------------------------------------
+
+ public Test getTest(String suiteClassName)
+ {
+ Test t = super.getTest(suiteClassName);
+ if (methods.isEmpty())
+ {
+ return t;
+ }
+ else
+ {
+ return new SelectiveTestSuite((TestSuite)t, methods);
+ }
+ }
+
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+
+ // Private -------------------------------------------------------
+
+ /**
+ * Scan command line for an argument of type "-t testMethod1,testMethod2,..." and processes it.
+ */
+ private String[] preProcessCommandLine(String[] args)
+ {
+ List l = new ArrayList();
+ for (int i = 0; i < args.length; i++)
+ {
+ if ("-t".equals(args[i]))
+ {
+ i++;
+ for(StringTokenizer st = new StringTokenizer(args[i], ","); st.hasMoreTokens(); )
+ {
+ methods.add(st.nextToken());
+ }
+ }
+ else
+ {
+ l.add(args[i]);
+ }
+ }
+
+ String[] a = new String[l.size()];
+ return (String[])l.toArray(a);
+ }
+
+ // Inner classes -------------------------------------------------
+}
Property changes on: trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestRunner.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestSuite.java (from rev 4054, trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/junit/SelectiveTestSuite.java)
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestSuite.java (rev 0)
+++ trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestSuite.java 2008-04-15 13:30:48 UTC (rev 4060)
@@ -0,0 +1,110 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.messaging.tests.util.junit;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+
+
+/**
+ * A TestSuite that filters tests.
+ *
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public class SelectiveTestSuite extends TestSuite
+{
+ // Constants -----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ private List methods;
+ private List tests;
+
+ // Constructors --------------------------------------------------
+
+ public SelectiveTestSuite(TestSuite original, List methods)
+ {
+ tests = new ArrayList();
+ this.methods = new ArrayList(methods);
+ this.methods.add("warning");
+
+ for(Enumeration e = original.tests(); e.hasMoreElements();)
+ {
+ TestCase tc = (TestCase)e.nextElement();
+ if (methods.contains(tc.getName()))
+ {
+ tests.add(tc);
+ }
+ }
+
+ if (tests.isEmpty())
+ {
+ tests.add(new TestCase("warning")
+ {
+ protected void runTest()
+ {
+ fail("The SelectiveTestSuite did not select any test.");
+ }
+ });
+ }
+ }
+
+
+ // TestSuite overrides -------------------------------------------
+
+ public Test testAt(int index)
+ {
+ return (Test)tests.get(index);
+ }
+
+ public int testCount()
+ {
+ return tests.size();
+ }
+
+ public Enumeration tests()
+ {
+ return Collections.enumeration(tests);
+ }
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+}
Property changes on: trunk/tests/src/org/jboss/messaging/tests/util/junit/SelectiveTestSuite.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
More information about the jboss-cvs-commits
mailing list