]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merged all 5.4 build script and testing tools related changes to 6.0
authorArtur Signell <artur.signell@itmill.com>
Mon, 20 Apr 2009 05:52:38 +0000 (05:52 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 20 Apr 2009 05:52:38 +0000 (05:52 +0000)
svn changeset:7462/svn branch:6.0

build/bin/mergetool.py
build/build.xml
build/package/start.sh
src/com/itmill/toolkit/launcher/ITMillToolkitDesktopMode.java

index 91d9d5105c1ac4e598357b7f903f425b7803fb0b..7ed1cb157945c92f9f2c15f037d8a212bd3dbed6 100755 (executable)
@@ -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/") \
index e5cadfd72e869aa9f980d1beda07d4425f08c61b..ec50f34df76c03ab0d83baa1b6565cb25c216e6d 100644 (file)
 
         <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}" />
 
     <!-- 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}"/>
         </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>
         </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>        
 
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
         <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. -->
     <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>
 
index 448d3184155a50ea839264a3015b54101eedb5dd..febda97e4cfbdcfd9b6d3a71c7701ddc80b04342 100644 (file)
@@ -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
index 72aecc4464bf9f158b8d242136fbe25f04ad3d2c..e16fea21cbe5a1e848d9963dbdbb20f4bbebe599 100644 (file)
@@ -63,14 +63,12 @@ public class ITMillToolkitDesktopMode {
         final String url = ITMillToolkitWebMode.runServer(serverArgs,
                 "Desktop Mode");
 
-        // Open browser into application URL
-        if (url != null) {
+        if (!serverArgs.containsKey("nogui") && url != null) {
+                       
+            // Open browser into application URL
             BrowserLauncher.openBrowser(url);
-        }
-
-        // Open control dialog
-        if (url != null) {
 
+            // Open control dialog
             /*
              * Swing components should never be manipulated outside the event
              * dispatch thread.