]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge from versions/5.4 to versions/6.0:
authorMarko Grönroos <magi@iki.fi>
Tue, 31 Mar 2009 12:15:01 +0000 (12:15 +0000)
committerMarko Grönroos <magi@iki.fi>
Tue, 31 Mar 2009 12:15:01 +0000 (12:15 +0000)
Merged [7195]: A 'tests' target in build script for running tests in TeamCity.
Merged [7198]: A fix for 'tests' target in build script for running tests in TeamCity.
Merged [7199]: Another fix for 'tests' target in build script for running tests in TeamCity.
Merged [7200]: Publish library JAR as a build artefact in TeamCity.
Merged [7201]: Publish nightly build in web only if publish property set. Publish as TeamCity artefact only in the 'nightly' target.
Merged [7232]: Use 'major.minor.tag' for 'nightly' version number instead of 'major.minor-tag'.
Merged [7233]: Remove old gwt link in 'nightly' target, in case the link target changes.
Merged [7234]: Remove old gwt link in 'nightly' target properly.
Merged [7235]: Make link to gwt directory better in the nightly target.
Merged [7236]: A fix for publishing nightly Jar.

svn changeset:7251/svn branch:6.0

build/build.xml

index 5ae5bcf141295a85994796aa22097c6339dfbb5d..38f305c830b20f85196a5e9083202495d6584f2c 100644 (file)
     <!-- Nightly build.                                                     -->
     <!-- ================================================================== -->
 
+    <!-- Create symlink to GWT installation directory. -->
     <target name="gwt-symlink">
-        <!-- We need to create a symlink to the GWT directory, because we   -->
-        <!-- are building automatically.                                    -->
+
+        <!-- Optional property. -->
         <property name="gwt.link.target" value="../../gwt-1.5"/>
 
-        <!-- Create the link unless it already exists. -->
-        <available file="build/gwt" property="gwt.link.available"/> 
-               <if>
-            <not>
-                <isset property="gwt.link.available"/>
-            </not>
-                       <then>
-                <echo>Creating symlink to GWT installation directory.</echo>
-                <symlink link="gwt" resource="${gwt.link.target}" failonerror="false"/>
-                       </then>
-            <else>
-                <echo>Symlink to GWT installation directory already exists</echo>
-            </else>
-               </if>
+        <!-- Remove the old link, as the link target may have changed. -->
+        <exec executable="rm" dir="build" searchpath="true" failonerror="false">
+            <arg value="gwt"/>
+        </exec>
 
+        <echo>Creating symlink to GWT installation directory.</echo>
+        <exec executable="ln" dir="build" searchpath="true" failonerror="true">
+            <arg value="-s"/> <!-- Symlink.   -->
+            <arg value="-f"/> <!-- Overwrite. -->
+            <arg value="${gwt.link.target}"/>
+            <arg value="gwt"/>
+        </exec>
     </target>
 
     <!-- Initialize a nightly build. -->
         <tstamp>
             <format property="nightly.date" pattern="yyyyMMdd"/>
         </tstamp>
-        <property name="version" value="${version.minor}-${build.tag}-${nightly.date}-c${build.number}"/>
+        <property name="version" value="${version.minor}.${build.tag}-${nightly.date}-c${build.number}"/>
+        <echo>Version will be: ${version}</echo>
 
         <!-- Tell TeamCity the build name. Have to do it this way, because   -->
         <!-- this script needs to get the plain build number as a parameter. -->
         <echo>##teamcity[buildNumber '${version.minor}-c${build.number}']</echo>
     </target>
 
+    <target name="nightly-teamcity-publish">
+        <!-- Publish as a TeamCity artifact. -->
+        <echo>##teamcity[publishArtifacts '${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}']</echo>
+    </target>
+
     <!-- Copies the nightly build results to the download server. -->
-    <target name="nightly-install">
+    <target name="nightly-download-publish" if="nightly.publish">
+        <!-- Publish to the download server. -->
         <echo>Installing ${output-dir}/WebContent/${lib-jar-name} to ${nightly.publish}</echo>
         <echo>Hopefully you have permissions for the copy operation with SSH.</echo>
 
 
         <echo>Result: ${nightly.install.scp.result}</echo>
     </target>
+
+    <target name="nightly-install" depends="nightly-teamcity-publish, nightly-download-publish">
+    </target>
+
+    <!-- ================================================================== -->
+    <!-- Automated tests.                                                   -->
+    <!-- ================================================================== -->
+
+    <target name="tests">
+        <echo>##teamcity[testSuiteStarted name='com.itmill.toolkit.tests.test-framework']</echo>
+
+        <!-- A smoke test for testing the testing framework. -->
+        <echo>##teamcity[testStarted name='testingSmoketest']</echo>
+        <echo>##teamcity[testStdOut name='testingSmoketest' out='Here be some text related to the test.]</echo>
+        <echo>##teamcity[testFinished name='testingSmoketest']</echo>
+
+        <echo>##teamcity[testSuiteFinished name='com.itmill.toolkit.tests.test-framework']</echo>
+    </target>
 </project>