1.1 --- a/misc/ravebuild/build.xml Mon Apr 09 22:28:17 2007 +0000
1.2 +++ b/misc/ravebuild/build.xml Tue Apr 10 14:18:06 2007 +0000
1.3 @@ -1257,5 +1257,79 @@
1.4 <property name="installer.suffix" value="${installer.suffix}"/>
1.5 </ant>
1.6 </target>
1.7 +
1.8 + <target name="commit-validation"
1.9 + depends="commitValidation, no-commit-validation, no-test-properties"
1.10 + description="Runs tests to validate IDE before commit."
1.11 + />
1.12 +
1.13 + <target name="commitValidation" depends="check-commit-validation" if="run.validation">
1.14 + <property name="xtest.home" location="../../xtest"/>
1.15 + <ant dir="../gravy" target="clean"/>
1.16 + <!--exec dir="${basedir}/../gravy" executable="ant" failonerror="yes"/-->
1.17 + <ant dir="../../jemmy" target="jar"/>
1.18 + <ant dir="${basedir}/../gravy" target="jar">
1.19 + <property name="no.deps" value="true"/>
1.20 + <property name="java.version.excludes" location="${basedir}/../../jemmy/util/${ant.java.version}.excludes"/>
1.21 + </ant>
1.22 + <ant dir="../test" target="sanitytests">
1.23 + <property name="jdkhome" value="${env.JAVA_HOME}"/>
1.24 + <property name="netbeans.dest.dir" location="../../nbbuild/netbeans"/>
1.25 + </ant>
1.26 + </target>
1.27 + <target name="check-commit-validation">
1.28 + <condition property="run.validation">
1.29 + <and>
1.30 + <available file="../test/build.xml"/>
1.31 + <available file="../gravy/build.xml"/>
1.32 + <available file="../../jemmy/build.xml"/>
1.33 + <available file="../../jellytools/build.xml"/>
1.34 + <available file="../../xtest/build.xml"/>
1.35 + <available file="../../testtools/external/httpunit/httpunit.jar"/>
1.36 + </and>
1.37 + </condition>
1.38 + </target>
1.39 +
1.40 + <target name="check-test-properties">
1.41 + <condition property="have.properties">
1.42 + <available file="../test/data/DefaultDeploymentTargets.properties"/>
1.43 + </condition>
1.44 + </target>
1.45 +
1.46 + <target name="no-test-properties" depends="check-test-properties" unless="have.properties">
1.47 + <fail>
1.48 + visualweb/test/data/DefaultDeploymentTargets.properties is absent.
1.49 + Copy DefaultDeploymentTargets.properties.template to DefaultDeploymeye ntTargets.properties
1.50 + and edit it manally, set location af Glassfish Application Server
1.51 + </fail>
1.52 + </target>
1.53 +
1.54 + <target name="no-commit-validation" depends="check-commit-validation" unless="run.validation">
1.55 + <echo>
1.56 + *** WARNING ***
1.57 + You do not seem to have the modules needed to run the commit validation test suite.
1.58 + You may not commit any changes into the CVS repository without running these tests.
1.59 + For more information: http://www.netbeans.org/community/guidelines/commit.html
1.60 +
1.61 + Run checkout-test-tools target to get necessary modules from cvs repository
1.62 + </echo>
1.63 + </target>
1.64 +
1.65 + <target name="build-test-tools" depends="checkout-test-tools">
1.66 + <ant dir="../../xtest" target="makedist-simple">
1.67 + <property name="netbeans.dest.dir" value="${basedir}/../../nbbuild/netbeans"/>
1.68 + </ant>
1.69 + <!--ant dir="${basedir}/../../jellytools">
1.70 + <property name="netbeans.dest.dir" value="${basedir}/../../nbbuild/netbeans"/>
1.71 + </ant-->
1.72 + <ant dir="${basedir}/../../jemmy"/>
1.73 + </target>
1.74 +
1.75 + <target name="checkout-test-tools" depends="check-commit-validation" unless="run.validation">
1.76 + <property name="cvsroot" value=":pserver:anoncvs@cvs.netbeans.org:/cvs"/>
1.77 + <cvs command="checkout -P" compressionlevel="6" cvsroot="${cvsroot}" dest="../.."
1.78 + package="testtools/external jemmy jellytools xtest core/external nbbuild junit/external"
1.79 + quiet="true" failonerror="true"/>
1.80 + </target>
1.81 </project>
1.82