1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
<?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 name="TestRunner" default="all-master-check" basedir="../../../../..">
<property name="script.version" value="1.0.4"/>
<property name="btd.repo.dir" value="${ide.repo.dir}"/>
<!-- Properties for internal purpose-->
<property name="ide.dest.dir" value="zip"/>
<property name="ide.dest.file" value="ide.zip"/>
<property name="btd.dest.dir" value="${ide.dest.dir}"/>
<property name="btd.dest.file" value="btd.zip"/>
<property name="results.dir" value="results"/>
<property name="results.file.unit" value="results-unit.zip"/>
<property name="results.file.functional" value="results-functional.zip"/>
<property name="netbeans.dir" value="netbeans"/>
<property name="testdistribution.dir" value="testdistribution"/>
<property name="installer.dir" value="installer"/>
<property name="installer.target.dir" value="netbeans"/>
<property name="installer.target.dir.glassfish" value="glassfish"/>
<target name="master-check" unless="is.master">
<antcall target="all"/>
</target>
<target name="master-results-hack" if="is.master">
<mkdir dir="testdistribution/unit/junit-results"/>
<mkdir dir="testdistribution/unit/results"/>
<mkdir dir="testdistribution/qa-functional/results/foo"/>
<copyfile forceoverwrite="true" src="/space/hudson/foo.xml" dest="testdistribution/unit/junit-results/foo.xml"/>
<copyfile forceoverwrite="true" src="/space/hudson/foo.xml" dest="testdistribution/unit/results/foo.xml"/>
<copyfile forceoverwrite="true" src="/space/hudson/foo.xml" dest="testdistribution/qa-functional/results/foo.xml"/>
</target>
<target name="all-master-check">
<available file="/space/hudsonserver/master" property="is.master"/>
<antcall target="master-results-hack"/>
<antcall target="master-check"/>
</target>
<target name="all" depends="clean,init,unzip-ide">
<echo message="Script version: ${script.version}"/>
</target>
<target name="clean" description="Removes everything from basedir (even dir whee are zip files stored).">
<delete dir="${netbeans.dir}"/>
<delete dir="${results.dir}"/>
<delete dir="${testdistribution.dir}"/>
<delete dir="${installer.dir}"/>
<delete dir="${ide.dest.dir}"/>
</target>
<target name="download-ide" unless="build.ide.exist">
<mkdir dir="${ide.dest.dir}"/>
<get src="${ide.repo.dir}${ide.repo.file}"
dest="${ide.dest.dir}/${ide.repo.file}"/>
</target>
<target name="unzip-ide" unless="installer">
<antcall target="download-ide"/>
<unzip src="${ide.dest.dir}/${ide.repo.file}" dest="${basedir}"/>
</target>
<target name="init">
<condition property="testtype.unit">
<equals arg1="${test.types}" arg2="unit"/>
</condition>
<condition property="testtype.functional">
<equals arg1="${test.types}" arg2="qa-functional"/>
</condition>
<available file="${ide.dest.dir}/${buildnumber}-${ide.dest.file}" property="build.ide.exist"/>
<available file="${btd.dest.dir}/${buildnumber}-${btd.dest.file}" property="build.btd.exist"/>
</target>
</project>
|