incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1378500 - in /incubator/ooo/trunk/main/test: ./ reportstyle/ testgui/source/testcase/gui/ testgui/source/testcase/gui/bvt/ testgui/source/testsuite/gui/
Date Wed, 29 Aug 2012 10:58:42 GMT
Author: liuzhe
Date: Wed Aug 29 10:58:41 2012
New Revision: 1378500

URL: http://svn.apache.org/viewvc?rev=1378500&view=rev
Log:
some updates for bvt

Added:
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java
      - copied, changed from r1378002, incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/FileTypeTest.java
      - copied, changed from r1378002, incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/SmokeTest.java
      - copied, changed from r1378002, incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java
Removed:
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java
    incubator/ooo/trunk/main/test/testgui/source/testsuite/gui/BVT.java
Modified:
    incubator/ooo/trunk/main/test/build.xml
    incubator/ooo/trunk/main/test/reportstyle/junit-frames.xsl

Modified: incubator/ooo/trunk/main/test/build.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/build.xml?rev=1378500&r1=1378499&r2=1378500&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/build.xml (original)
+++ incubator/ooo/trunk/main/test/build.xml Wed Aug 29 10:58:41 2012
@@ -23,18 +23,17 @@
 
 
 <project basedir="." default="test">
-	<property file="build.properties" />
-	<property environment="env" />
-
-	<property name="env.INPATH" value="output"/>
-	<property name="classes" value="${env.INPATH}/class" />
-	<property name="dist" value="${env.INPATH}/dist" />
-
-	<property name="env.TESTSPACE" value="testspace" />
-	<property name="env.JUNIT_HOME" value="${env.INPATH}/junit" />
+    <property environment="env" />
+    <property file="build.properties" />
+    <property name="env.DISPLAY" value=":0.0"/>
+	<property name="env.INPATH" value="testspace"/>
+	<property name="env.TESTSPACE" value="${env.INPATH}" />
+	<property name="env.JUNIT_HOME" value="external/junit" />
 	<property name="junit.home" value="${env.JUNIT_HOME}" />
 	<property name="testspace" value="${env.TESTSPACE}" />
-	<property name="test.classes" value="testsuite/gui/BVT.class" />
+    <property name="classes" value="${testspace}/class" />
+	<property name="dist" value="${testspace}/dist" />
+	<property name="test.classes" value="testcase/gui/SmokeTest.class,testcase/gui/BVTFileType.class,testcase/gui/BVTFunction.class"
/>
 	<property name="test.output" value="${testspace}/output" />
 	<property name="test.result" value="${test.output}/result" />
 	<property name="test.report" value="${test.output}/report" />
@@ -115,7 +114,7 @@
 	</target>
 
 	<target name="clean" description="Clean all output">
-		<delete dir="${env.INPATH}" />
+		<delete dir="${testspace}" />
 	</target>
 
 	<target name="check.junit">
@@ -180,21 +179,20 @@
 	</target>
 
 	<target name="download.build" unless="download.build.skip" description="Download the
specified build from the remote server">
-		<script language="javascript">
-					  	value = project.getProperty("openoffice.archive.url");
-					    resolvedValue = project.replaceProperties(value);
-						project.setProperty("openoffice.archive.url", resolvedValue);
-		</script>
-		<echo>Archive address: ${openoffice.archive.url}</echo>
+        <echo message="openoffice.archive.url.resolved=${openoffice.archive.url}" file="${testspace}/.temp.properties"
/>
+        <property file="${testspace}/.temp.properties"/>
+        <echo>Archive address: ${openoffice.archive.url.resolved}</echo>
 		<property name="openoffice.archive.dir" value="${testspace}/download/${openoffice.build}"
/>
 		<mkdir dir="${openoffice.archive.dir}" />
-		<get src="${openoffice.archive.url}" dest="${openoffice.archive.dir}" verbose="false"
usetimestamp="true" skipexisting="true" />
+		<get src="${openoffice.archive.url.resolved}" dest="${openoffice.archive.dir}" verbose="false"
usetimestamp="true" skipexisting="true" />
 	</target>
 
 	<target name="install.build" unless="install.build.skip" description="Install the build
to the local">
-		<property name="openoffice.installation.dir" value="${testspace}/installation/${openoffice.build}"
/>
-		<mkdir dir="${openoffice.installation.dir}" />
-		<unzip dest="${openoffice.installation.dir}">
+		<property name="openoffice.installation.dir" value="${testspace}/install/${openoffice.build}"
/>
+        <property name="openoffice.installation.dest" value="${testspace}/install/dest"
/>
+        <delete dir="${openoffice.installation.dest}"/>
+		<mkdir dir="${openoffice.installation.dest}" />
+		<unzip dest="${openoffice.installation.dest}">
 			<fileset dir="${openoffice.archive.dir}">
 				<include name="**/Apache_OpenOffice*.zip" />
 			</fileset>
@@ -204,9 +202,21 @@
 				<fileset dir="${openoffice.archive.dir}" includes="Apache_OpenOffice*.gz" />
 			</path>
 		</pathconvert>
-		<exec dir="${openoffice.installation.dir}" executable="tar" failifexecutionfails="false">
+		<exec dir="${openoffice.installation.dest}" executable="tar" failifexecutionfails="false">
 			<arg line="-zxf ${gz.files}" />
 		</exec>
+        
+        <pathconvert property="openoffice.12.dir" pathsep=" " setonempty="false">
+			<path>
+				<dirset dir="${openoffice.installation.dest}">
+                    <include name="*"/>
+                </dirset>
+			</path>
+		</pathconvert>
+
+        <move file="${openoffice.12.dir}" tofile="${openoffice.installation.dir}"/>
+        <delete dir="${openoffice.installation.dest}"/>
+         
 		<pathconvert property="openoffice.bin" pathsep=" " setonempty="false">
 			<path>
 				<fileset dir="${openoffice.installation.dir}" includes="**/*/soffice.bin" followsymlinks="false"
/>
@@ -229,7 +239,8 @@
 		<mkdir dir="${test.output}/temp" />
 		
 		<junit fork="yes" forkmode="once" tempdir="${test.output}/temp" printsummary="yes" showoutput="false"
errorProperty="test.failed" failureProperty="test.failed" dir=".">
-			<sysproperty key="openoffice.home" value="${openoffice.home}" />
+			<env key="DISPLAY" value="${env.DISPLAY}"/>
+            <sysproperty key="openoffice.home" value="${openoffice.home}" />
 			<sysproperty key="testspace" value="${testspace}" />
 			<syspropertyset>
 				<propertyref builtin="commandline" />
@@ -264,25 +275,17 @@
 	</target>
 
 	<target name="report.test" unless="report.test.skip" description="Upload the testing
result to report repository.">
-		<exec executable="hostname" outputproperty="host.name" />
-		<property name="report.to" value="${openoffice.build}_${host.name}" />
-		<!--
-		<echo>Sending report to ${report.repos.server}/${report.repos.dir}/${report.to}</echo>
-		<ftp server="${report.repos.server}" remotedir="${report.repos.dir}/${report.to}" userid="${report.repos.user}"
password="${report.repos.password}" action="mkdir" />
-		<ftp server="${report.repos.server}" remotedir="${report.repos.dir}/${report.to}" userid="${report.repos.user}"
password="${report.repos.password}" depends="yes">
-			<fileset dir="${test.output}">
-			</fileset>
-		</ftp>
-		-->
+		<property name="report.to" value="r${openoffice.Revision}/${os.name}-${os.version}-${os.arch}"
/>
 		<echo>Uploading report to ${report.repos}/${report.to}</echo>
-		<tempfile property="report.to.temp" suffix=".output" destDir="${testspace}" deleteonexit="true"/>
+		<property name="report.to.temp" location="${testspace}/.temp.ouput"/>
+        <delete dir="${report.to.temp}" deleteonexit="true"/>
 		<copy todir="${report.to.temp}/${report.to}">
 			<fileset dir="${test.output}" />
 		</copy>
-
-		<scp todir="${report.repos}">
+		<scp todir="${report.repos}" trust="true">
 			<fileset dir="${report.to.temp}"/>
 		</scp>
+        <delete dir="${report.to.temp}" deleteonexit="true"/>
 	</target>
 
 	<target name="detect.build" depends="find.build" description="Check if new build is available.
If no new build is available, the target will be failed.">

Modified: incubator/ooo/trunk/main/test/reportstyle/junit-frames.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/reportstyle/junit-frames.xsl?rev=1378500&r1=1378499&r2=1378500&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/reportstyle/junit-frames.xsl (original)
+++ incubator/ooo/trunk/main/test/reportstyle/junit-frames.xsl Wed Aug 29 10:58:41 2012
@@ -739,6 +739,18 @@ h6 {
 <!-- method header -->
 <xsl:template name="testcase.test.header">
     <xsl:param name="show.class" select="''"/>
+     <script type="text/javascript" language="JavaScript"><![CDATA[
+        function showScreenshot(pack, name) {
+        	if (pack) {
+        	    pack = pack.replace(new RegExp("[^.]+", "g"), "./");
+        		location.href= "." + pack + "../screenshot/" + name;
+        	} else {
+        		location.href="../screenshot/" + name;
+        	}
+        	
+        }
+      ]]>
+    </script>
     <tr valign="top">
 	<xsl:if test="boolean($show.class)">
 	    <th>Class</th>
@@ -807,7 +819,7 @@ h6 {
         </xsl:attribute>
 	<xsl:variable name="class.href">
 	    <xsl:value-of select="concat(translate(../@package,'.','/'), '/', ../@id, '_', ../@name,
'.html')"/>
-	</xsl:variable>
+	</xsl:variable>	
 	<xsl:if test="boolean($show.class)">
 	    <td><a href="{$class.href}"><xsl:value-of select="../@name"/></a></td>
 	</xsl:if>
@@ -843,17 +855,21 @@ h6 {
         </td>
 
 		<!-- Added by AOO -->
+
 		<td>
-			<xsl:variable name="screenshot.dir">
-				<xsl:if test="not(boolean($show.class))">../../screenshot</xsl:if>
-				<xsl:if test="boolean($show.class)">../screenshot</xsl:if>
+			<xsl:variable name="screenshot.path">
+				<xsl:if test="not(boolean($show.class))">
+					<xsl:value-of select="../@package"/>
+				</xsl:if>
+				<xsl:if test="boolean($show.class)"></xsl:if>
 			</xsl:variable>
+	
 			<xsl:choose>
 				<xsl:when test="failure">
-					<a href="{$screenshot.dir}/{@classname}.{@name}.failure.png">screenshot</a>
+					<a href="javascript:showScreenshot('{$screenshot.path}','{@classname}.{@name}.failure.png')">screenshot</a>
 				</xsl:when>
 				<xsl:when test="error">
-					<a href="{$screenshot.dir}/{@classname}.{@name}.error.png">screenshot</a>
+					<a href="javascript:showScreenshot('{$screenshot.path}','{@classname}.{@name}.error.png')">screenshot</a>
 				</xsl:when>
 				<xsl:otherwise>
 				</xsl:otherwise>

Copied: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java
(from r1378002, incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java?p2=incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java&p1=incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java&r1=1378002&r2=1378500&rev=1378500&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java Wed
Aug 29 10:58:41 2012
@@ -22,7 +22,7 @@
 /**
  * 
  */
-package testcase.gui;
+package testcase.gui.bvt;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -103,7 +103,7 @@ import testlib.gui.Log;
 /**
  * 
  */
-public class BVTFunction {
+public class BasicFunctionTest {
 
 	@Rule
 	public Log LOG = new Log();

Copied: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/FileTypeTest.java (from
r1378002, incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/FileTypeTest.java?p2=incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/FileTypeTest.java&p1=incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java&r1=1378002&r2=1378500&rev=1378500&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/FileTypeTest.java Wed Aug
29 10:58:41 2012
@@ -22,7 +22,7 @@
 /**
  * 
  */
-package testcase.gui;
+package testcase.gui.bvt;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -63,7 +63,7 @@ import testlib.gui.Log;
 /**
  * 
  */
-public class BVTFileType {
+public class FileTypeTest {
 
 	@Rule
 	public Log LOG = new Log();

Copied: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/SmokeTest.java (from
r1378002, incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/SmokeTest.java?p2=incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/SmokeTest.java&p1=incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java&r1=1378002&r2=1378500&rev=1378500&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/bvt/SmokeTest.java Wed Aug 29
10:58:41 2012
@@ -21,17 +21,18 @@
 
 
 
-package testcase.gui;
+package testcase.gui.bvt;
 
-import static org.openoffice.test.common.Testspace.*;
-import static org.junit.Assert.*;
-import static org.openoffice.test.common.FileUtil.*;
-import static testlib.gui.AppUtil.*;
-import static testlib.gui.UIMap.*;
+import static org.junit.Assert.assertTrue;
+import static org.openoffice.test.common.FileUtil.readFileAsString;
+import static org.openoffice.test.common.Testspace.prepareData;
+import static testlib.gui.AppUtil.submitOpenDlg;
+import static testlib.gui.UIMap.app;
+import static testlib.gui.UIMap.oo;
+import static testlib.gui.UIMap.writer;
 
 import java.io.File;
 
-import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Rule;



Mime
View raw message