officeotron usage in export tests without external dependencies
officeotron is a OOXML documents validator which can be used for verification of export files in tests. Previously it was possible to use it only from external repository with extra build steps. Change-Id: Iae6ec3695fdfaf738d180405047ff04b2024c906 Reviewed-on: https://gerrit.libreoffice.org/27388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
This commit is contained in:
parent
5cb52cf97d
commit
3011a704d9
5 changed files with 37 additions and 23 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -57,6 +57,7 @@
|
||||||
/lo.xcent
|
/lo.xcent
|
||||||
/bin/bffvalidator.sh
|
/bin/bffvalidator.sh
|
||||||
/bin/odfvalidator.sh
|
/bin/odfvalidator.sh
|
||||||
|
/bin/officeotron.sh
|
||||||
/Makefile
|
/Makefile
|
||||||
/NEWS
|
/NEWS
|
||||||
/TODO
|
/TODO
|
||||||
|
|
|
@ -216,6 +216,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
|
||||||
$(call fetch_Optional,DBGHELP,DBGHELP_DLL) \
|
$(call fetch_Optional,DBGHELP,DBGHELP_DLL) \
|
||||||
$(call fetch_Optional,ODK,UNOWINREG_DLL) \
|
$(call fetch_Optional,ODK,UNOWINREG_DLL) \
|
||||||
$(call fetch_Optional,ODFVALIDATOR,ODFVALIDATOR_JAR) \
|
$(call fetch_Optional,ODFVALIDATOR,ODFVALIDATOR_JAR) \
|
||||||
|
$(call fetch_Optional,OFFICEOTRON,OFFICEOTRON_JAR) \
|
||||||
,$(call fetch_Download_item,http://dev-www.libreoffice.org/extern,$(item)))
|
,$(call fetch_Download_item,http://dev-www.libreoffice.org/extern,$(item)))
|
||||||
$(foreach item, \
|
$(foreach item, \
|
||||||
$(call fetch_Optional_pack,BARCODE_EXTENSION_PACK) \
|
$(call fetch_Optional_pack,BARCODE_EXTENSION_PACK) \
|
||||||
|
|
2
bin/officeotron.sh.in
Normal file
2
bin/officeotron.sh.in
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
java -jar @TARFILE_LOCATION@/@OFFICEOTRON_JAR@ "$@"
|
55
configure.ac
55
configure.ac
|
@ -2756,39 +2756,46 @@ if test "$with_export_validation" = yes; then
|
||||||
if test -z "$ODFVALIDATOR_JAR"; then
|
if test -z "$ODFVALIDATOR_JAR"; then
|
||||||
AC_MSG_ERROR([odfvalidator jar location is not determined (--with-export-validation)])
|
AC_MSG_ERROR([odfvalidator jar location is not determined (--with-export-validation)])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$build_os" = "cygwin"; then
|
|
||||||
# In case of CygWin it will be executed from Windows,
|
|
||||||
# so we need to run bash and absolute path to validator
|
|
||||||
# so instead of "odfvalidator" it will be
|
|
||||||
# something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
|
|
||||||
ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
AC_SUBST(ODFVALIDATOR)
|
|
||||||
|
|
||||||
if test "$build_os" = "cygwin"; then
|
if test "$build_os" = "cygwin"; then
|
||||||
# In case of CygWin it will be executed from Windows,
|
# In case of CygWin it will be executed from Windows,
|
||||||
# so we need to run bash and absolute path to validator
|
# so we need to run bash and absolute path to validator
|
||||||
# so instead of "officeotron" it will be
|
# so instead of "odfvalidator" it will be
|
||||||
# something like "bash.exe C:\cygwin\opt\lo\bin\officeotron"
|
# something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
|
||||||
AC_PATH_PROGS(OFFICEOTRON, officeotron)
|
ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
|
||||||
if test -z "$OFFICEOTRON"; then
|
fi
|
||||||
AC_MSG_ERROR([officeotron not found, but required by --with-export-validation])
|
AC_SUBST(ODFVALIDATOR)
|
||||||
|
|
||||||
|
|
||||||
|
AC_PATH_PROGS(OFFICEOTRON, officeotron)
|
||||||
|
if test -z "$OFFICEOTRON"; then
|
||||||
|
# remember to download the officeotron with validator later
|
||||||
|
AC_MSG_NOTICE([no officeotron found, will download it])
|
||||||
|
BUILD_TYPE="$BUILD_TYPE OFFICEOTRON"
|
||||||
|
OFFICEOTRON="bin/officeotron.sh"
|
||||||
|
|
||||||
|
# and fetch name of officeotron jar name from download.lst
|
||||||
|
OFFICEOTRON_JAR=`sed -ne "s/export *OFFICEOTRON_JAR *:= *\(.*\) */\1/p" download.lst`
|
||||||
|
AC_SUBST(OFFICEOTRON_JAR)
|
||||||
|
|
||||||
|
if test -z "$OFFICEOTRON_JAR"; then
|
||||||
|
AC_MSG_ERROR([officeotron jar location is not determined (--with-export-validation)])
|
||||||
fi
|
fi
|
||||||
OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`"
|
|
||||||
else
|
else
|
||||||
AC_CHECK_PROGS(OFFICEOTRON, officeotron)
|
# check version of existing officeotron
|
||||||
if test -z "$OFFICEOTRON"; then
|
OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
|
||||||
AC_MSG_ERROR([officeotron not found, but required by --with-export-validation])
|
if test 0"$OFFICEOTRON_VER" -lt 704; then
|
||||||
|
AC_MSG_ERROR([officeotron too old])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
|
if test "$build_os" = "cygwin"; then
|
||||||
if test 0"$OFFICEOTRON_VER" -lt 704; then
|
# In case of CygWin it will be executed from Windows,
|
||||||
AC_MSG_ERROR([officeotron too old])
|
# so we need to run bash and absolute path to validator
|
||||||
|
# so instead of "odfvalidator" it will be
|
||||||
|
# something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
|
||||||
|
OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(OFFICEOTRON)
|
AC_SUBST(OFFICEOTRON)
|
||||||
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
|
@ -4677,6 +4684,7 @@ if test "$cross_compiling" = "yes"; then
|
||||||
lo.xcent.in \
|
lo.xcent.in \
|
||||||
bin/bffvalidator.sh.in \
|
bin/bffvalidator.sh.in \
|
||||||
bin/odfvalidator.sh.in \
|
bin/odfvalidator.sh.in \
|
||||||
|
bin/officeotron.sh.in \
|
||||||
instsetoo_native/util/openoffice.lst.in \
|
instsetoo_native/util/openoffice.lst.in \
|
||||||
config_host/*.in \
|
config_host/*.in \
|
||||||
sysui/desktop/macosx/Info.plist.in \
|
sysui/desktop/macosx/Info.plist.in \
|
||||||
|
@ -13018,6 +13026,7 @@ AC_CONFIG_FILES([config_host.mk
|
||||||
lo.xcent
|
lo.xcent
|
||||||
bin/bffvalidator.sh
|
bin/bffvalidator.sh
|
||||||
bin/odfvalidator.sh
|
bin/odfvalidator.sh
|
||||||
|
bin/officeotron.sh
|
||||||
instsetoo_native/util/openoffice.lst
|
instsetoo_native/util/openoffice.lst
|
||||||
sysui/desktop/macosx/Info.plist
|
sysui/desktop/macosx/Info.plist
|
||||||
ios/lo.xcconfig])
|
ios/lo.xcconfig])
|
||||||
|
|
|
@ -115,6 +115,7 @@ export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
|
||||||
export ODFGEN_VERSION_MICRO := 6
|
export ODFGEN_VERSION_MICRO := 6
|
||||||
export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
|
export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
|
||||||
export ODFVALIDATOR_JAR := e7f181c1d969dbd553644b191cb0a6d3-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar
|
export ODFVALIDATOR_JAR := e7f181c1d969dbd553644b191cb0a6d3-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar
|
||||||
|
export OFFICEOTRON_JAR := c038af04c1431525e3fdee57d32b865e-officeotron-0.7.4-master.jar
|
||||||
export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
|
export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
|
||||||
export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
|
export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
|
||||||
export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
|
export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
|
||||||
|
|
Loading…
Reference in a new issue