mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
M build.xml
M dist/build.xml M dist/netbeans/build.xml A dist/netbeans/logging.properties M dist/netbeans/webclient.properties M webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java Make it so the automated tests run from netbeans.
This commit is contained in:
parent
a0551c6cad
commit
af2c6c08f1
@ -30,7 +30,7 @@
|
||||
|
||||
<property name="Name" value="Webclient"/>
|
||||
<property name="name" value="webclient"/>
|
||||
<property name="version" value="20040929"/>
|
||||
<property name="version" value="20070216"/>
|
||||
|
||||
<!-- ************ Per user local properties ******************************* -->
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
<target name="external">
|
||||
|
||||
<mkdir dir="${build.home}"/>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
|
4
java/dist/build.xml
vendored
4
java/dist/build.xml
vendored
@ -152,7 +152,9 @@
|
||||
|
||||
<target name="copy.samples.src" depends="prepare">
|
||||
<copy todir="${dist.home}/samples/automated/src/main/java">
|
||||
<fileset dir="${source.home}/webclient/test/automated/src/classes" />
|
||||
<fileset dir="${source.home}/webclient/test/automated/src/classes">
|
||||
<exclude name="**/*Bookmark*.java" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${dist.home}/samples/automated/src/main/resources">
|
||||
<fileset dir="${source.home}/webclient/test/automated/src/test">
|
||||
|
137
java/dist/netbeans/build.xml
vendored
137
java/dist/netbeans/build.xml
vendored
@ -69,6 +69,9 @@
|
||||
-->
|
||||
|
||||
<target name="-pre-init">
|
||||
|
||||
<property name="debug.jvm.args" value="" />
|
||||
|
||||
<condition property="so.prefix" value="">
|
||||
<and>
|
||||
<os family="windows" />
|
||||
@ -99,7 +102,58 @@
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="platform" value="linux">
|
||||
<condition property="platform" value="unix">
|
||||
<and>
|
||||
<os family="unix" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="platform" value="mac">
|
||||
<and>
|
||||
<os family="mac" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="build.unix.classes">
|
||||
<and>
|
||||
<isset property="platform" />
|
||||
<equals arg1="${platform}" arg2="unix" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="build.win32.classes">
|
||||
<and>
|
||||
<isset property="platform" />
|
||||
<equals arg1="${platform}" arg2="win32" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="build.mac.classes">
|
||||
<and>
|
||||
<isset property="platform" />
|
||||
<equals arg1="${platform}" arg2="mac" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="PATH_SEP" value=";">
|
||||
<and>
|
||||
<os family="windows" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="PATH_SEP" value=":">
|
||||
<and>
|
||||
<os family="unix" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="FILE_PATH_SEP" value="\">
|
||||
<and>
|
||||
<os family="windows" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="FILE_PATH_SEP" value="/">
|
||||
<and>
|
||||
<os family="unix" />
|
||||
</and>
|
||||
@ -146,4 +200,85 @@ ${so.prefix}xul.${so.extension}.
|
||||
<fileset dir="${basedir}/../bin" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="run">
|
||||
|
||||
<java classname="org.mozilla.webclient.test.TestBrowser" fork="true">
|
||||
<jvmarg value="-DNSPR_LOG_MODULES=webclient:4,webclientstub:4,pluglets:4"/>
|
||||
<jvmarg value="-DNSPR_LOG_FILE=${build.dir}/webclient.log"/>
|
||||
<jvmarg value="-Dbuild.test.results.dir=${build.test.results.dir}" />
|
||||
<jvmarg value="-DBROWSER_BIN_DIR=${browser.bin.dir}"/>
|
||||
<jvmarg line="${debug.jvm.args}"/>
|
||||
<jvmarg line="-Djava.util.logging.config.file=${basedir}${FILE_PATH_SEP}logging.properties"/>
|
||||
|
||||
<classpath refid="run.classpath"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="-init-macrodef-javac">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute name="srcdir" default="${src.dir}"/>
|
||||
<attribute name="destdir" default="${build.classes.dir}"/>
|
||||
<attribute name="classpath" default="${javac.classpath}"/>
|
||||
<attribute name="debug" default="${javac.debug}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${javac.compilerargs}"/>
|
||||
<customize/>
|
||||
<patternset>
|
||||
<exclude name="**/*Win32*.java" if="build.unix.classes"/>
|
||||
<exclude name="**/*Cocoa*.java" if="build.unix.classes"/>
|
||||
</patternset>
|
||||
|
||||
<patternset>
|
||||
<exclude name="**/*Gtk*.java" if="build.win32.classes"/>
|
||||
<exclude name="**/*Cocoa*.java" if="build.win32.classes"/>
|
||||
</patternset>
|
||||
|
||||
<patternset>
|
||||
<exclude name="**/*Gtk*.java" if="build.mac.classes"/>
|
||||
<exclude name="**/*Win32*.java" if="build.mac.classes"/>
|
||||
</patternset>
|
||||
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
|
||||
<target name="-init-macrodef-junit">
|
||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute name="includes" default="**/*Test.java"/>
|
||||
<sequential>
|
||||
<junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
|
||||
<jvmarg value="-DNSPR_LOG_MODULES=webclient:4,webclientstub:4,pluglets:4"/>
|
||||
<jvmarg value="-DNSPR_LOG_FILE=${build.dir}/webclient.log"/>
|
||||
<jvmarg value="-Dbuild.test.results.dir=${build.test.results.dir}" />
|
||||
<jvmarg value="-DBROWSER_BIN_DIR=${browser.bin.dir}"/>
|
||||
<jvmarg line="${debug.jvm.args}"/>
|
||||
<jvmarg line="-Djava.util.logging.config.file=${basedir}${FILE_PATH_SEP}logging.properties"/>
|
||||
|
||||
<batchtest todir="${build.test.results.dir}">
|
||||
<fileset dir="${test.src.dir}" includes="@{includes}"/>
|
||||
</batchtest>
|
||||
<classpath>
|
||||
<path path="${run.test.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper type="glob" from="test-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
</junit>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
|
12
java/dist/netbeans/logging.properties
vendored
Executable file
12
java/dist/netbeans/logging.properties
vendored
Executable file
@ -0,0 +1,12 @@
|
||||
handlers= java.util.logging.FileHandler
|
||||
|
||||
.level=INFO
|
||||
|
||||
|
||||
java.util.logging.FileHandler.pattern = %h/moz-java-log.xml
|
||||
java.util.logging.FileHandler.limit = 50000
|
||||
java.util.logging.FileHandler.append = true
|
||||
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
|
||||
|
||||
org.mozilla.webclient.level=INFO
|
||||
|
2
java/dist/netbeans/webclient.properties
vendored
2
java/dist/netbeans/webclient.properties
vendored
@ -1,3 +1,5 @@
|
||||
bin.artifacts.pattern=${so.prefix}webclient.${so.extension},${so.prefix}javadomjni.${so.extension},components/${so.prefix}javadom.${so.extension}
|
||||
#debug.jvm.args=-Xdebug -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=y
|
||||
|
||||
|
||||
browser.bin.dir=F:\\Projects\\mozilla\\MOZILLA_NIH\\FIREFOX_1_5_0_9_CVS\\mozilla\\xulrunner-win32_o.obj\\dist\\bin
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: WebclientTestCase.java,v 1.12 2007/01/30 18:26:37 edburns%acm.org Exp $
|
||||
* $Id: WebclientTestCase.java,v 1.13 2007/02/21 01:40:44 edburns%acm.org Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -47,7 +47,7 @@ import org.mozilla.util.THTTPD;
|
||||
*
|
||||
* <B>Lifetime And Scope</B> <P>
|
||||
*
|
||||
* @version $Id: WebclientTestCase.java,v 1.12 2007/01/30 18:26:37 edburns%acm.org Exp $
|
||||
* @version $Id: WebclientTestCase.java,v 1.13 2007/02/21 01:40:44 edburns%acm.org Exp $
|
||||
*
|
||||
* @see Blah
|
||||
* @see Bloo
|
||||
@ -113,14 +113,21 @@ public void setUp()
|
||||
{
|
||||
verifyPreconditions();
|
||||
|
||||
// Set the OUTPUT_FILE_ROOT
|
||||
String mozSrcValue = null;
|
||||
File outputRoot = null;
|
||||
|
||||
assertTrue(null != (mozSrcValue =
|
||||
System.getProperty("MOZ_SRC")));
|
||||
OUTPUT_FILE_ROOT = mozSrcValue + File.separator +
|
||||
"mozilla" + File.separator + "java" + File.separator +
|
||||
"webclient" + File.separator + OUTPUT_FILE_ROOT;
|
||||
|
||||
if (null != (mozSrcValue = System.getProperty("MOZ_SRC"))) {
|
||||
OUTPUT_FILE_ROOT = mozSrcValue + File.separator +
|
||||
"mozilla" + File.separator + "java" + File.separator +
|
||||
"webclient" + File.separator + OUTPUT_FILE_ROOT;
|
||||
}
|
||||
else {
|
||||
assertTrue(null != (OUTPUT_FILE_ROOT = System.getProperty("build.test.results.dir")));
|
||||
}
|
||||
outputRoot = new File(OUTPUT_FILE_ROOT);
|
||||
assertTrue(outputRoot.exists());
|
||||
|
||||
LOGGER.info(this.getClass().getName() + " setUp()");
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user