summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-04-20 05:52:38 +0000
committerArtur Signell <artur.signell@itmill.com>2009-04-20 05:52:38 +0000
commitc2a6543cbf31109a73166908cef09cc607d2a403 (patch)
treed1b93a3e0327cb3bbfd4310f1dc58ca4276ad496 /build
parent2bd4106c653cf87e63532977d43c787288cf4918 (diff)
downloadvaadin-framework-c2a6543cbf31109a73166908cef09cc607d2a403.tar.gz
vaadin-framework-c2a6543cbf31109a73166908cef09cc607d2a403.zip
Merged all 5.4 build script and testing tools related changes to 6.0
svn changeset:7462/svn branch:6.0
Diffstat (limited to 'build')
-rwxr-xr-xbuild/bin/mergetool.py11
-rw-r--r--build/build.xml60
-rw-r--r--build/package/start.sh2
3 files changed, 51 insertions, 22 deletions
diff --git a/build/bin/mergetool.py b/build/bin/mergetool.py
index 91d9d5105c..7ed1cb1579 100755
--- a/build/bin/mergetool.py
+++ b/build/bin/mergetool.py
@@ -79,12 +79,10 @@ def listChangedFiles():
changed = []
for line in lines:
# Remove trailing newline
- line = line.rstrip()
- print line
-
+ line = line[:-1]
+
# Extract the file state and name
- filestate = line[0:2].strip()
- filename = line[7:].strip()
+ (filestate, filename) = re.split(r'[ \+]+', line)
# Ignore files in build directory
if (filename.startswith("build/merge/") \
@@ -543,8 +541,7 @@ def commandRevert():
line = line[:-1]
# Extract the file state and name
- filestate = line[0:2].strip()
- filename = line[7:].strip()
+ (filestate, filename) = re.split(r'[ \+]+', line)
# Ignore files in build directory
if (filename.startswith("build/merge/") \
diff --git a/build/build.xml b/build/build.xml
index e5cadfd72e..ec50f34df7 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -186,9 +186,6 @@
<echo>Toolkit package is: ${toolkit-package}</echo>
- <!-- Can run XEP only if license is available. -->
- <available file="build/lib/XEP/license.xml" property="xep.license.available" />
-
<!-- Create result dir unless already exists -->
<mkdir dir="${result-path}" />
@@ -975,6 +972,18 @@
<!-- Manual: Build from external repository. -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <target name="manual-init">
+ <!-- Can run XEP only if license is available. -->
+ <available file="build/lib/XEP/license.xml" property="xep.license.available" />
+
+ <!-- Path to installed XEP license. -->
+ <property name="xep.license.path.installed" value="/opt/RenderX/XEP/license.xml"/>
+ <echo>XEP license expected to be installed as ${xep.license.path.installed}</echo>
+
+ <!-- Can copy XEP license only if it is available. -->
+ <available file="${xep.license.path.installed}" property="xep.license.installed"/>
+ </target>
+
<!-- Checkout doc repository. -->
<target name="manual-checkout" unless="docdir">
<mkdir dir="${checkout-path}"/>
@@ -986,13 +995,15 @@
</exec>
<property name="docdir" value="${checkout-path}/doc"/>
+ </target>
- <!-- If we have a XEP license, copy it to proper place. -->
- <copy file="/opt/RenderX/XEP/license.xml" todir="${docdir}/build/lib/XEP"/>
+ <!-- If the XEP is installed, copy it to proper place. -->
+ <target name="xep-license-copy" if="xep.license.installed">
+ <copy file="${xep.license.path.installed}" todir="${docdir}/build/lib/XEP"/>
</target>
<!-- Build manual. -->
- <target name="manual-build">
+ <target name="manual-build" depends="xep-license-copy">
<ant dir="${docdir}" antfile="build/build.xml" inheritAll="false">
<property name="version" value="${version}"/>
</ant>
@@ -1009,7 +1020,7 @@
</copy>
</target>
- <target name="manual" depends="init, manual-checkout, manual-build, manual-copy">
+ <target name="manual" depends="init, manual-init, manual-checkout, manual-build, manual-copy">
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -1120,7 +1131,7 @@
<echo>Installing ${output-dir}/WebContent/${lib-jar-name} to ${nightly.publish}</echo>
<echo>Hopefully you have permissions for the copy operation with SSH.</echo>
- <!-- The test task will need this. -->
+ <!-- Only Linux tests allowed. TODO: Generalize this. -->
<property name="package.linux.filename" value="${result-path}/${product-file}-${package-platform}-${version}.tar.gz"/>
<!-- Copy the linux installation package and the JAR. -->
@@ -1137,16 +1148,37 @@
<target name="nightly-install" depends="nightly-teamcity-publish, nightly-download-publish">
</target>
- <target name="testingtools-test">
- <!-- Run the separate test script. -->
- <ant antfile="build/testing/test.xml" inheritall="true">
- </ant>
- </target>
-
<!-- ================================================================== -->
<!-- Automated tests. -->
<!-- ================================================================== -->
+ <target name="tests" depends="ant-tests, testingtools-tests">
+ </target>
+
+ <target name="testingtools-tests" depends="init">
+ <fail unless="product-file" message="The 'product-file' property must be defined."/>
+ <fail unless="package-platform" message="The 'package-platform' property must be defined."/>
+ <fail unless="version" message="The 'version' property must be defined."/>
+
+ <!-- Parameters for the test.xml script. -->
+ <fail unless="testingtools.tester.host" message="The 'testingtools.tester.host' property must be defined."/>
+ <fail unless="testingtools.deployment.url" message="The 'testingtools.deployment.url' property must be defined."/>
+
+ <property name="package.platform.name" value="${product-file}-${package-platform}-${version}"/>
+
+ <!-- Only Linux tests allowed. TODO: Generalize this. -->
+ <property name="package.linux.filename" value="${result-path}/${package.platform.name}.tar.gz"/>
+
+ <!-- Run the separate test script. -->
+ <ant antfile="tests/test.xml" target="test-package" inheritall="false" inheritrefs="true">
+ <property name="package.filename" value="${package.linux.filename}"/>
+ <property name="testing.testarea" value="/tmp/testarea"/>
+ <property name="package.name" value="${package.platform.name}"/>
+ <property name="testingtools.tester.host" value="${testingtools.tester.host}"/>
+ <property name="testingtools.deployment.url" value="${testingtools.deployment.url}"/>
+ </ant>
+ </target>
+
<target name="ant-tests">
<echo>##teamcity[testSuiteStarted name='com.itmill.toolkit.tests.test-framework']</echo>
diff --git a/build/package/start.sh b/build/package/start.sh
index 448d318415..febda97e4c 100644
--- a/build/package/start.sh
+++ b/build/package/start.sh
@@ -4,4 +4,4 @@ if [ "$1" != "" ] ; then
cd $1
fi
-java -cp WebContent/demo/lib/jetty/jetty-6.1.7.jar:WebContent/demo/lib/jetty/jetty-util-6.1.7.jar:WebContent/demo/lib/jetty/servlet-api-2.5-6.1.7.jar:WebContent/WEB-INF/classes:WebContent/WEB-INF/src com.itmill.toolkit.launcher.ITMillToolkitDesktopMode
+java -cp WebContent/demo/lib/jetty/jetty-6.1.7.jar:WebContent/demo/lib/jetty/jetty-util-6.1.7.jar:WebContent/demo/lib/jetty/servlet-api-2.5-6.1.7.jar:WebContent/WEB-INF/classes:WebContent/WEB-INF/src com.itmill.toolkit.launcher.ITMillToolkitDesktopMode $ITMILLTOOLKIT_PARAMETERS