Author: damjan Date: Fri Aug 17 16:28:12 2018 New Revision: 1838268 URL: http://svn.apache.org/viewvc?rev=1838268&view=rev Log: Move smoketestdoc to the top-level test directory. This is where all integration tests are meant to be; a binary copy of the smoketest was there already.
Delete the smoketestoo_native module whose only purpose was to run the smoketest, something that is done in the Java bvt test now. Delete the old smoketest binary copy in test/ and use this one built from source. Build an .odt file for the smoketest instead of the legacy .sxw. Note that we now require main/ built to build test/, as the Ant build files required to build smoketest's Java component are in main/. Patch by: me Added: openoffice/trunk/test/smoketestdoc/ - copied from r1838267, openoffice/trunk/main/smoketestdoc/ openoffice/trunk/test/smoketestdoc/MANIFEST.MF - copied unchanged from r1838230, openoffice/trunk/main/smoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF openoffice/trunk/test/smoketestdoc/build.xml (with props) openoffice/trunk/test/smoketestdoc/manifest.xml - copied unchanged from r1838230, openoffice/trunk/main/smoketestdoc/com/sun/star/comp/smoketest/manifest.xml openoffice/trunk/test/smoketestdoc/src/ openoffice/trunk/test/smoketestdoc/src/main/ openoffice/trunk/test/smoketestdoc/src/main/java/ openoffice/trunk/test/smoketestdoc/src/main/java/com/ - copied from r1838230, openoffice/trunk/main/smoketestdoc/com/ Removed: openoffice/trunk/main/smoketestdoc/ openoffice/trunk/main/smoketestoo_native/ openoffice/trunk/test/smoketestdoc/com/ openoffice/trunk/test/smoketestdoc/prj/ openoffice/trunk/test/smoketestdoc/src/main/java/com/sun/star/comp/smoketest/MANIFEST.MF openoffice/trunk/test/smoketestdoc/src/main/java/com/sun/star/comp/smoketest/delzip openoffice/trunk/test/smoketestdoc/src/main/java/com/sun/star/comp/smoketest/makefile.mk openoffice/trunk/test/smoketestdoc/src/main/java/com/sun/star/comp/smoketest/manifest.xml openoffice/trunk/test/testgui/data/TestExtension.oxt openoffice/trunk/test/testgui/data/smoketestdoc.sxw Modified: openoffice/trunk/main/postprocess/prj/build.lst openoffice/trunk/main/ridljar/java/ridl/build.xml openoffice/trunk/main/solenv/ant/aoo-ant.xml openoffice/trunk/main/solenv/ant/idl.xml openoffice/trunk/test/build.xml openoffice/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java Modified: openoffice/trunk/main/postprocess/prj/build.lst URL: http://svn.apache.org/viewvc/openoffice/trunk/main/postprocess/prj/build.lst?rev=1838268&r1=1838267&r2=1838268&view=diff ============================================================================== --- openoffice/trunk/main/postprocess/prj/build.lst (original) +++ openoffice/trunk/main/postprocess/prj/build.lst Fri Aug 17 16:28:12 2018 @@ -1,4 +1,4 @@ -po postprocess :: svgio accessibility automation basctl bean chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui test testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext smoketestdoc uui writerfilter winaccessibility oox MYSQLC:mysqlc LIBXSLT:libxslt NULL +po postprocess :: svgio accessibility automation basctl bean chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui test testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext uui writerfilter winaccessibility oox MYSQLC:mysqlc LIBXSLT:libxslt NULL po postprocess usr1 - all po_mkout NULL po postprocess\checkxml nmake - all po_checkxml NULL po postprocess\checkdeliver nmake - all po_checkdlv NULL Modified: openoffice/trunk/main/ridljar/java/ridl/build.xml URL: http://svn.apache.org/viewvc/openoffice/trunk/main/ridljar/java/ridl/build.xml?rev=1838268&r1=1838267&r2=1838268&view=diff ============================================================================== --- openoffice/trunk/main/ridljar/java/ridl/build.xml (original) +++ openoffice/trunk/main/ridljar/java/ridl/build.xml Fri Aug 17 16:28:12 2018 @@ -44,8 +44,8 @@ <target name="javamaker-udkapi" depends="check-javamaker-udkapi" extensionOf="pre-compile" unless="${javamaker.udkapi.skip}"> <mkdir dir="${main.build.dir}"/> <javamaker - input-rdb="${OUTDIR}/bin/udkapi.rdb" - output-directory="${main.build.dir}"/> + inputRdb="${OUTDIR}/bin/udkapi.rdb" + outputDirectory="${main.build.dir}"/> <touch file="${javamaker.udkapi.flag}"/> </target> Modified: openoffice/trunk/main/solenv/ant/aoo-ant.xml URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/ant/aoo-ant.xml?rev=1838268&r1=1838267&r2=1838268&view=diff ============================================================================== --- openoffice/trunk/main/solenv/ant/aoo-ant.xml (original) +++ openoffice/trunk/main/solenv/ant/aoo-ant.xml Fri Aug 17 16:28:12 2018 @@ -121,29 +121,32 @@ includeantruntime="false"/> </target> - <target name="test-check"> - <local name="tests.present"/> - <available type="dir" file="${test.src.dir}" property="tests.present"/> - <echo message="No tests" unless:set="tests.present"/> + <macrodef name="check-test"> + <sequential> + <local name="tests.present"/> + <available type="dir" file="${test.src.dir}" property="tests.present"/> + <echo message="No tests" unless:set="tests.present"/> - <local name="only.junit.absent"/> - <condition property="only.junit.absent"> - <and> - <isset property="tests.present"/> - <not><isset property="OOO_JUNIT_JAR"/></not> - </and> - </condition> - <echo message="No junit, skipping tests" if:set="only.junit.absent"/> + <local name="only.junit.absent"/> + <condition property="only.junit.absent"> + <and> + <isset property="tests.present"/> + <not><isset property="OOO_JUNIT_JAR"/></not> + </and> + </condition> + <echo message="No junit, skipping tests" if:set="only.junit.absent"/> - <condition property="test.skip"> - <or> - <not><isset property="test.present"/></not> - <not><isset property="OOO_JUNIT_JAR"/></not> - </or> - </condition> - </target> + <condition property="test.skip"> + <or> + <not><isset property="test.present"/></not> + <not><isset property="OOO_JUNIT_JAR"/></not> + </or> + </condition> + </sequential> + </macrodef> - <target name="test-compile" depends="compile,idl,test-check"> + <target name="test-compile" depends="compile,idl"> + <check-test/> <mkdir dir="${test.build.dir}" unless:set="test.skip"/> <javac srcdir="${test.src.dir}" destdir="${test.build.dir}" Modified: openoffice/trunk/main/solenv/ant/idl.xml URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/ant/idl.xml?rev=1838268&r1=1838267&r2=1838268&view=diff ============================================================================== --- openoffice/trunk/main/solenv/ant/idl.xml (original) +++ openoffice/trunk/main/solenv/ant/idl.xml Fri Aug 17 16:28:12 2018 @@ -36,81 +36,92 @@ <property name="idl.classes.build.dir" location="${idl.build.dir}/classes"/> <property name="idl.javamaker.flag" location="${idl.build.dir}/idl.javamaker.flag"/> - <target name="idl" depends="idl-check,idl-javamaker"/> - - <target name="idl-check"> - <local name="idl.files.exist"/> - <condition property="idl.files.exist"> - <resourcecount refid="idl.files" when="greater" count="0"/> - </condition> - - <local name="idl.files.union"/> - <union id="idl.files.union" if:set="idl.files.exist"> - <filelist refid="idl.files"/> - </union> - <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" if:set="idl.files.exist"> - <srcresources refid="idl.files.union"/> - </uptodate> - <property name="idl.uptodate" value="true" unless:set="idl.files.exist"/> + <target name="idl"> + <check-idl/> + <build-idl unless:set="idl.uptodate"/> </target> + <macrodef name="check-idl"> + <sequential> + <local name="idl.files.exist"/> + <condition property="idl.files.exist"> + <resourcecount refid="idl.files" when="greater" count="0"/> + </condition> + + <local name="idl.files.union"/> + <union id="idl.files.union" if:set="idl.files.exist"> + <filelist refid="idl.files"/> + </union> + <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" if:set="idl.files.exist"> + <srcresources refid="idl.files.union"/> + </uptodate> + <property name="idl.uptodate" value="true" unless:set="idl.files.exist"/> + </sequential> + </macrodef> + + <macrodef name="build-idl"> + <sequential> + <idlc/> + <regmerge/> + <javamaker + inputRdb="${idl.rdb.build.dir}/registry.rdb" + outputDirectory="${idl.classes.build.dir}" + noDependentTypes="true" + excludes="${OUTDIR}/bin/types.rdb"/> + <touch file="${idl.javamaker.flag}"/> + </sequential> + </macrodef> + + <macrodef name="idlc"> + <sequential> + <mkdir dir="${idl.urd.build.dir}"/> + <apply executable="${OUTDIR}/bin/idlc" failonerror="true"> + <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/> + <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/> + <arg value="-I${OUTDIR}/idl"/> + <arg value="-O"/> + <arg value="${idl.urd.build.dir}"/> + <arg value="-verbose"/> + <arg value="-cid"/> + <arg value="-we"/> + <filelist refid="idl.files"/> + </apply> + </sequential> + </macrodef> + + <macrodef name="regmerge"> + <sequential> + <mkdir dir="${idl.rdb.build.dir}"/> + <delete file="${idl.rdb.build.dir}/registry.rdb"/> + <apply executable="${OUTDIR}/bin/regmerge" failonerror="true"> + <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/> + <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/> + <arg value="${idl.rdb.build.dir}/registry.rdb"/> + <arg value="/UCR"/> + <fileset dir="${idl.urd.build.dir}" includes="**/*.urd"/> + </apply> + </sequential> + </macrodef> + <macrodef name="javamaker"> - <attribute name="input-rdb"/> - <attribute name="output-directory"/> - <attribute name="no-dependent-types" default="false"/> + <attribute name="inputRdb"/> + <attribute name="outputDirectory"/> + <attribute name="noDependentTypes" default="false"/> <attribute name="excludes" default=""/> <sequential> - <mkdir dir="@{output-directory}"/> + <mkdir dir="@{outputDirectory}"/> <exec executable="${OUTDIR}/bin/javamaker" failonerror="true"> <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/> <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/> - <arg value="-O@{output-directory}"/> + <arg value="-O@{outputDirectory}"/> <arg value="-BUCR"/> <arg value="-nD" - if:true="@{no-dependent-types}"/> - <arg value="@{input-rdb}"/> + if:true="@{noDependentTypes}"/> + <arg value="@{inputRdb}"/> <arg value="-X@{excludes}" unless:blank="@{excludes}"/> </exec> </sequential> </macrodef> - - <target name="idl-javamaker" depends="idl-regmerge" unless="idl.uptodate"> - <mkdir dir="${idl.classes.build.dir}"/> - <javamaker - input-rdb="${idl.rdb.build.dir}/registry.rdb" - output-directory="${idl.classes.build.dir}" - no-dependent-types="true" - excludes="${OUTDIR}/bin/types.rdb"/> - <touch file="${idl.javamaker.flag}"/> - </target> - - <target name="idl-regmerge" depends="idl-idlc" unless="idl.uptodate"> - <mkdir dir="${idl.rdb.build.dir}"/> - <delete file="${idl.rdb.build.dir}/registry.rdb"/> - <apply executable="${OUTDIR}/bin/regmerge" failonerror="true"> - <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/> - <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/> - <arg value="${idl.rdb.build.dir}/registry.rdb"/> - <arg value="/UCR"/> - <fileset dir="${idl.urd.build.dir}" includes="**/*.urd"/> - </apply> - </target> - - <target name="idl-idlc" unless="idl.uptodate"> - <mkdir dir="${idl.urd.build.dir}"/> - <apply executable="${OUTDIR}/bin/idlc" failonerror="true"> - <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/> - <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/> - <arg value="-I${OUTDIR}/idl"/> - <arg value="-O"/> - <arg value="${idl.urd.build.dir}"/> - <arg value="-verbose"/> - <arg value="-cid"/> - <arg value="-we"/> - <filelist refid="idl.files"/> - </apply> - </target> - </project> Modified: openoffice/trunk/test/build.xml URL: http://svn.apache.org/viewvc/openoffice/trunk/test/build.xml?rev=1838268&r1=1838267&r2=1838268&view=diff ============================================================================== --- openoffice/trunk/test/build.xml (original) +++ openoffice/trunk/test/build.xml Fri Aug 17 16:28:12 2018 @@ -126,9 +126,11 @@ <delete dir="testcommon/bin" /> <delete dir="testgui/bin" /> <delete dir="testuno/bin" /> + <ant antfile="smoketestdoc/build.xml" target="clean" inheritAll="false" useNativeBasedir="true"/> </target> - + <target name="compile" depends="testcommon.compile,testgui.compile,testuno.compile" description="Compile source code"> + <ant antfile="smoketestdoc/build.xml" inheritAll="false" useNativeBasedir="true"/> </target> <target name="dist" depends="clean,compile"> Added: openoffice/trunk/test/smoketestdoc/build.xml URL: http://svn.apache.org/viewvc/openoffice/trunk/test/smoketestdoc/build.xml?rev=1838268&view=auto ============================================================================== --- openoffice/trunk/test/smoketestdoc/build.xml (added) +++ openoffice/trunk/test/smoketestdoc/build.xml Fri Aug 17 16:28:12 2018 @@ -0,0 +1,101 @@ +<?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="smoketest" default="smoketest"> + <dirname property="project.dir" file="${ant.file.smoketest}"/> + <property file="${project.dir}/../../main/ant.properties"/> + + <property name="data.dir" value="${project.dir}/data"/> + <property name="build.base.dir" value="${project.dir}/target"/> + <property name="jar.dir" value="${build.base.dir}/TestExtension"/> + <import file="${SRC_ROOT}/solenv/ant/aoo-ant.xml"/> + + <target name="init-project"> + <property name="jar.name" value="TestExtension"/> + <property name="jar.manifest" value="${project.dir}/MANIFEST.MF"/> + <mkdir dir="${build.base.dir}/TestExtension"/> + + <path id="main.classpath"> + <pathelement location="${OUTDIR}/bin/juh.jar"/> + <pathelement location="${OUTDIR}/bin/jurt.jar"/> + <pathelement location="${OUTDIR}/bin/ridl.jar"/> + <pathelement location="${OUTDIR}/bin/unoil.jar"/> + </path> + + <filelist id="idl.files"> + <file name="${main.src.dir}/com/sun/star/comp/smoketest/TestExtension.idl"/> + </filelist> + </target> + + <target name="pre-clean"> + <delete dir="${project.dir}/target"/> + </target> + + <target name="smoketestdoc"> + <mkdir dir="${project.dir}/target/smoketestdoc"/> + <copy todir="${project.dir}/target/smoketestdoc"> + <resources> + <file name="${data.dir}/content.xml"/> + <file name="${data.dir}/meta.xml"/> + <file name="${data.dir}/settings.xml"/> + <file name="${data.dir}/styles.xml"/> + </resources> + </copy> + <echo message="application/vnd.sun.xml.writer" file="${project.dir}/target/smoketestdoc/mimetype"/> + <mkdir dir="${project.dir}/target/smoketestdoc/META-INF"/> + <copy file="${data.dir}/manifest.xml" todir="${project.dir}/target/smoketestdoc/META-INF"/> + <mkdir dir="${project.dir}/target/smoketestdoc/Basic"/> + <copy file="${data.dir}/script-lc.xml" todir="${project.dir}/target/smoketestdoc/Basic"/> + <mkdir dir="${project.dir}/target/smoketestdoc/Basic/Standard"/> + <copy todir="${project.dir}/target/smoketestdoc/Basic/Standard"> + <resources> + <file name="${data.dir}/script-lb.xml"/> + <file name="${data.dir}/Events.xml"/> + <file name="${data.dir}/Global.xml"/> + <file name="${data.dir}/Test_10er.xml"/> + <file name="${data.dir}/Test_DB.xml"/> + <file name="${data.dir}/Test_Ext.xml"/> + </resources> + </copy> + <mkdir dir="${project.dir}/target/smoketestdoc/Dialogs"/> + <copy file="${data.dir}/dialog-lc.xml" todir="${project.dir}/target/smoketestdoc/Dialogs"/> + <mkdir dir="${project.dir}/target/smoketestdoc/Dialogs/Standard"/> + <copy todir="${project.dir}/target/smoketestdoc/Dialogs/Standard"> + <resources> + <file name="${data.dir}/dialog-lb.xml"/> + <file name="${data.dir}/OptionsDlg.xml"/> + </resources> + </copy> + <zip destfile="${project.dir}/target/smoketestdoc.odt" basedir="${project.dir}/target/smoketestdoc" filesonly="true"/> + </target> + + <target name="TestExtension" depends="main,smoketestdoc"> + <copy tofile="${build.base.dir}/TestExtension/TestExtension.rdb" file="${idl.rdb.build.dir}/registry.rdb"/> + <mkdir dir="${build.base.dir}/TestExtension/META-INF"/> + <copy todir="${build.base.dir}/TestExtension/META-INF" file="${project.dir}/manifest.xml"/> + <zip destfile="${build.base.dir}/TestExtension.oxt" basedir="${build.base.dir}/TestExtension"/> + </target> + + <target name="smoketest" depends="smoketestdoc,TestExtension"/> +</project> + Propchange: openoffice/trunk/test/smoketestdoc/build.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: openoffice/trunk/test/smoketestdoc/build.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: openoffice/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java URL: http://svn.apache.org/viewvc/openoffice/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java?rev=1838268&r1=1838267&r2=1838268&view=diff ============================================================================== --- openoffice/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java (original) +++ openoffice/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java Fri Aug 17 16:28:12 2018 @@ -72,9 +72,12 @@ public class BasicFunctionTest { @Test public void smokeTest() { File smoketestOutput = new File(aoo.getUserInstallation(), "user/temp"); - prepareData("TestExtension.oxt"); + File testDir = getFile().getParentFile(); + File smokeTestDir = new File(testDir, "smoketestdoc"); + File smokeTestTargetDir = new File(smokeTestDir, "target"); + prepareData(new File(smokeTestTargetDir, "TestExtension.oxt").getAbsolutePath()); // Open sample file smoketestdoc.sxw - open(prepareData("smoketestdoc.sxw")); + open(prepareData(new File(smokeTestTargetDir, "smoketestdoc.odt").getAbsolutePath())); writer.waitForEnabled(10, 2); // Run test cases app.dispatch("vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?language=Basic&location=document", 120);