diff options
Diffstat (limited to '')
25 files changed, 1637 insertions, 0 deletions
diff --git a/debian/tests/access2base-import b/debian/tests/access2base-import new file mode 100755 index 000000000..4065aefaf --- /dev/null +++ b/debian/tests/access2base-import @@ -0,0 +1,4 @@ +#!/usr/bin/python3 + +import access2base +print(access2base) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 000000000..293fbdd62 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,82 @@ +Tests: uno +Depends: @builddeps@, ure +Restrictions: allow-stderr, rw-build-tree + +#Tests: smoketest +#Architecture: amd64 i386 arm64 armhf s390x ppc64 ppc64el +#Depends: @builddeps@, libreoffice-dev, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress-nogui, libreoffice-math, libreoffice-base-nogui, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird, libreoffice-smoketest-data +#Restrictions: allow-stderr, rw-build-tree, skippable + +Tests: pyuno-import, uno-import +Depends: python3, python3-uno +Restrictions: superficial + +Tests: access2base-import +Depends: python3, python3-access2base +Restrictions: superficial + +# this is already done by smoketest upstream, but fails when doing it against +# the installed LO. works standalone, though, so it's patched out of the +# smoketest. Do it here separately. +Tests: test-extension +Architecture: amd64 i386 arm64 armhf s390x ppc64 ppc64el +Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk +Restrictions: allow-stderr, superficial + +Tests: test-extension-shared +Architecture: amd64 i386 arm64 armhf s390x ppc64 ppc64el +Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk +Restrictions: allow-stderr, needs-root, superficial + +# in the following some tests need RTL and CJK language packs installed to pass. +# he is the example for RTL, zh-tw for CJK (and zh-tw was choosen to also test xx-YY locales) + +Tests: uicheck-cui +Depends: @builddeps@, libreoffice-core, libreoffice-impress, libreoffice-writer, python3-uno +Restrictions: allow-stderr + +Tests: uicheck-sc +Architecture: alpha amd64 arm64 armel armhf i386 ia64 m68k mips mipsel mips64el powerpc ppc64 ppc64el s390x sparc64 powerpcspe kfreebsd-amd64 kfreebsd-i386 +Depends: @builddeps@, libreoffice-core, libreoffice-calc, libreoffice-draw, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-java-common, libreoffice-writer +Restrictions: allow-stderr + +Tests: uicheck-sd +Depends: @builddeps@, libreoffice-core, libreoffice-draw, libreoffice-impress, python3-uno +Restrictions: allow-stderr + +Tests: uicheck-sw +Architecture: alpha amd64 arm64 armel armhf i386 ia64 m68k mips mipsel mips64el powerpc ppc64 ppc64el s390x sparc64 powerpcspe kfreebsd-amd64 kfreebsd-i386 +Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-librelogo, libreoffice-java-common +Restrictions: allow-stderr + +Tests: uicheck-uitest +Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw +Restrictions: allow-stderr + +Tests: uicheck-writerperfect +Depends: @builddeps@, libreoffice-core, libreoffice-writer, python3-uno +Restrictions: allow-stderr + +Tests: junit +Architecture: alpha amd64 arm64 armel armhf i386 ia64 m68k mips mipsel mips64el powerpc ppc64 ppc64el s390x sparc64 powerpcspe kfreebsd-amd64 kfreebsd-i386 +Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird +Restrictions: allow-stderr, skippable + +Test-Command: export SYSTEM_UCPP=TRUE; export DOXYGEN=`which doxygen`; export ENABLE_JAVA=TRUE; export JDK=sun; export JAVADOC=/usr/lib/jvm/default-java/bin/javadoc; perl odk/util/check.pl /usr/lib/libreoffice/sdk +Depends: libreoffice-dev, libreoffice-dev-doc +Restrictions: superficial + +Tests: odk-build-examples +Architecture: amd64 i386 arm64 armhf s390x ppc64 ppc64el +Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, python3-uno +Restrictions: allow-stderr + +Tests: odk-build-examples-java +Architecture: amd64 i386 arm64 armhf s390x ppc64 ppc64el +Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, libreoffice-java-common, libofficebean-java +Restrictions: allow-stderr, skippable + +# inspired by https://salsa.debian.org/apparmor-team/apparmor-profiles-extra/commit/7fbcc4788d0e94764eeeff2f080796601241f986 +Test-Command: for i in /etc/apparmor.d/usr.lib.libreoffice.program.*; do /sbin/apparmor_parser --add --skip-cache --skip-kernel-load $i; done +Depends: libreoffice-common, apparmor +Restrictions: allow-stderr, superficial diff --git a/debian/tests/control.in b/debian/tests/control.in new file mode 100644 index 000000000..09f4cfc24 --- /dev/null +++ b/debian/tests/control.in @@ -0,0 +1,82 @@ +Tests: uno +Depends: @builddeps@, ure +Restrictions: allow-stderr, rw-build-tree + +#Tests: smoketest +#Architecture: %OOO_NOGUI_ARCHS% +#Depends: @builddeps@, libreoffice-dev, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress-nogui, libreoffice-math, libreoffice-base-nogui, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird, libreoffice-smoketest-data +#Restrictions: allow-stderr, rw-build-tree, skippable + +Tests: pyuno-import, uno-import +Depends: python3, python3-uno +Restrictions: superficial + +Tests: access2base-import +Depends: python3, python3-access2base +Restrictions: superficial + +# this is already done by smoketest upstream, but fails when doing it against +# the installed LO. works standalone, though, so it's patched out of the +# smoketest. Do it here separately. +Tests: test-extension +Architecture: %OOO_NOGUI_ARCHS% +Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk +Restrictions: allow-stderr, superficial + +Tests: test-extension-shared +Architecture: %OOO_NOGUI_ARCHS% +Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk +Restrictions: allow-stderr, needs-root, superficial + +# in the following some tests need RTL and CJK language packs installed to pass. +# he is the example for RTL, zh-tw for CJK (and zh-tw was choosen to also test xx-YY locales) + +Tests: uicheck-cui +Depends: @builddeps@, libreoffice-core, libreoffice-impress, libreoffice-writer, python3-uno +Restrictions: allow-stderr + +Tests: uicheck-sc +Architecture: %OOO_JAVA_ARCHS% +Depends: @builddeps@, libreoffice-core, libreoffice-calc, libreoffice-draw, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-java-common, libreoffice-writer +Restrictions: allow-stderr + +Tests: uicheck-sd +Depends: @builddeps@, libreoffice-core, libreoffice-draw, libreoffice-impress, python3-uno +Restrictions: allow-stderr + +Tests: uicheck-sw +Architecture: %OOO_JAVA_ARCHS% +Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-librelogo, libreoffice-java-common +Restrictions: allow-stderr + +Tests: uicheck-uitest +Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw +Restrictions: allow-stderr + +Tests: uicheck-writerperfect +Depends: @builddeps@, libreoffice-core, libreoffice-writer, python3-uno +Restrictions: allow-stderr + +Tests: junit +Architecture: %OOO_JAVA_ARCHS% +Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird +Restrictions: allow-stderr, skippable + +Test-Command: export SYSTEM_UCPP=TRUE; export DOXYGEN=`which doxygen`; export ENABLE_JAVA=TRUE; export JDK=sun; export JAVADOC=/usr/lib/jvm/default-java/bin/javadoc; perl odk/util/check.pl /usr/lib/libreoffice/sdk +Depends: libreoffice-dev, libreoffice-dev-doc +Restrictions: superficial + +Tests: odk-build-examples +Architecture: %OOO_NOGUI_ARCHS% +Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, python3-uno +Restrictions: allow-stderr + +Tests: odk-build-examples-java +Architecture: %OOO_NOGUI_ARCHS% +Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, libreoffice-java-common, libofficebean-java +Restrictions: allow-stderr, skippable + +# inspired by https://salsa.debian.org/apparmor-team/apparmor-profiles-extra/commit/7fbcc4788d0e94764eeeff2f080796601241f986 +Test-Command: for i in /etc/apparmor.d/usr.lib.libreoffice.program.*; do /sbin/apparmor_parser --add --skip-cache --skip-kernel-load $i; done +Depends: libreoffice-common, apparmor +Restrictions: allow-stderr, superficial diff --git a/debian/tests/junit b/debian/tests/junit new file mode 100755 index 000000000..82eda73b6 --- /dev/null +++ b/debian/tests/junit @@ -0,0 +1,62 @@ +#!/bin/bash +# autopkgtest check: Run junit base tests against an installed version of LibreOffice +# (C) 2013 Canonical Ltd. +# (c) 2015-2017 Software in the Public Interest, Inc. +# Authors: Bjoern Michaelsen <bjoern.michaelsen@canonical.com> +# Rene Engelhard <rene@debian.org> + +set -e +set -E + +# skip on Zero using architectures +if java -version 2>&1 | grep -q Zero; then + echo "Zero-using architecture. Skipping." + exit 77 +fi + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/java-subsequentcheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to only build Java-based unittests against an existing installation ======" +patch -p1 < ./debian/tests/patches/java-subsequentcheck-standalone.diff + +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk enable_report_builder=no +sed -i 's/export OOO_JUNIT_JAR=.*/export OOO_JUNIT_JAR=\/usr\/share\/java\/junit4.jar/' config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting subsequentcheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +eval `grep PLATFORMID config_host.mk` + +export PARALLELISM=$CHECK_PARALLELISM +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + bridges_SELECTED_BRIDGE=gcc3_$PLATFORMID \ + subsequentcheck verbose=t + +unapply + diff --git a/debian/tests/odk-build-examples b/debian/tests/odk-build-examples new file mode 100755 index 000000000..4b1139203 --- /dev/null +++ b/debian/tests/odk-build-examples @@ -0,0 +1,41 @@ +#!/bin/bash +# autopkgtest check: Run the odk/build-examples check against an installed +# version of the LibreOffice SDK +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 + +function unapply() { + cd $SRCDIR + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/odk-build-examples-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build the odk build-examples test against an existing installation ======" +patch -p1 < ./debian/tests/patches/odk-build-examples-standalone.diff + +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Starting build with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/sdk ======" + +cd $SRCDIR/odk + +export PARALLELISM=$CHECK_PARALLELISM +make -rk \ + CustomTarget_odk/build-examples verbose=t + +unapply + diff --git a/debian/tests/odk-build-examples-java b/debian/tests/odk-build-examples-java new file mode 100755 index 000000000..8da6ff38e --- /dev/null +++ b/debian/tests/odk-build-examples-java @@ -0,0 +1,47 @@ +#!/bin/bash +# autopkgtest check: Run the odk/build-examples check against an installed +# version of the LibreOffice SDK +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +# skip on Zero using architectures +if java -version 2>&1 | grep -q Zero; then + echo "Zero-using architecture. Skipping." + exit 77 +fi + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 + +function unapply() { + cd $SRCDIR + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/odk-build-examples-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build the odk build-examples test against an existing installation ======" +patch -p1 < ./debian/tests/patches/odk-build-examples-standalone.diff + +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Starting build with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/sdk ======" + +cd $SRCDIR/odk + +export PARALLELISM=$CHECK_PARALLELISM +make -rk \ + CustomTarget_odk/build-examples_java verbose=t + +unapply + diff --git a/debian/tests/patches/disable-db-tests.diff b/debian/tests/patches/disable-db-tests.diff new file mode 100644 index 000000000..7d148b9f1 --- /dev/null +++ b/debian/tests/patches/disable-db-tests.diff @@ -0,0 +1,130 @@ +diff -urN smoketest-old/data/Test_DB.xml smoketest/data/Test_DB.xml +--- a/smoketest-old/data/Basic/Standard/Test_DB.xml 2011-12-20 16:05:52.000000000 +0000 ++++ b/smoketest/data/Basic/Standard/Test_DB.xml 2011-12-29 23:09:08.000000000 +0000 +@@ -30,9 +30,6 @@ + + const cMessageDatabaseService = "Database Service" + const cMessageDatabaseOpen = "Open Database" +-const cMessageDatabaseInsert = "Insert record into Database" +-const cMessageDatabaseDelete = "Delete record from Database" +-const cMessageDatabaseSeek = "Read other record from Database" + const cMessageDatabaseClose = "Close Database" + + Sub TestDB +@@ -81,48 +78,6 @@ + LogTestResult( "Database "+ cMessageDatabaseService, TRUE ) + End If + +- gCurrentTestCase = cDBInsert +- sCurrentMessage = cMessageDatabaseInsert +- +- oRowSet.ActiveConnection = oDBConnection +- +- oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND +- oRowSet.Command = "SELECT * FROM " + sTable +- oRowSet.execute() +- +- oRowSet.moveToInsertRow +- oRowSet.updateString(5, sTestString) +- +- oRowSet.insertRow() +- nRowCount=oRowSet.RowCount +- +- oRowSet.moveToCurrentRow() +- +- bResult = (oRowSet.getString(5) = sTestString) +- LogTestResult( "Database "+ cMessageDatabaseInsert, bResult ) +- +- 'delete only if insert passed +- +- if (bResult) Then +- gCurrentTestCase = cDBDelete +- sCurrentMessage = cMessageDatabaseDelete +- oRowSet.deleteRow() +- bResult = (nRowCount - oRowSet.RowCount = 0) +- if ( bResult ) Then +- oRowSet.next() +- bResult = (nRowCount - oRowSet.RowCount = 1) +- End If +- LogTestResult( "Database "+ cMessageDatabaseDelete, bResult ) +- End If +- +- ' read other record +- +- gCurrentTestCase = cDBSeek +- sCurrentMessage = cMessageDatabaseSeek +- oRowSet.first() +- bResult = not (oRowSet.getString(5) = sTestString) +- LogTestResult( "Database "+ cMessageDatabaseSeek, bResult ) +- + gCurrentTestCase = cDBClose + sCurrentMessage = cMessageDatabaseClose + oDBConnection.Dispose() +diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk +index 204854748ec1..992ae1ed17c2 100644 +--- a/dbaccess/Module_dbaccess.mk ++++ b/dbaccess/Module_dbaccess.mk +@@ -32,63 +32,11 @@ $(eval $(call gb_Module_add_l10n_targets,dbaccess,\ + AllLangMoTarget_dba \ + )) + +-ifneq ($(OS),iOS) +-ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE) +-# remove if we have a be file for this +-ifeq ($(ENDIANNESS),little) +-$(eval $(call gb_Module_add_check_targets,dbaccess,\ +- CppunitTest_dbaccess_firebird_regression_test \ +-)) +-endif +-$(eval $(call gb_Module_add_check_targets,dbaccess,\ +- CppunitTest_dbaccess_firebird_test \ +-)) +-endif +- +-$(eval $(call gb_Module_add_check_targets,dbaccess,\ +- CppunitTest_dbaccess_dialog_save \ +- CppunitTest_dbaccess_empty_stdlib_save \ +- CppunitTest_dbaccess_nolib_save \ +- CppunitTest_dbaccess_macros_test \ +- CppunitTest_dbaccess_hsqlschema_import \ +-)) +- +-ifeq ($(ENABLE_JAVA),TRUE) +-$(eval $(call gb_Module_add_check_targets,dbaccess,\ +- CppunitTest_dbaccess_hsqldb_test \ +- CppunitTest_dbaccess_RowSetClones \ +-)) +-endif +- +-# This runs a suite of performance tests on embedded firebird and HSQLDB. +-# Instructions on running the test can be found in qa/unit/embeddedb_performancetest +-ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE) +-ifeq ($(ENABLE_JAVA),TRUE) +-$(eval $(call gb_Module_add_check_targets,dbaccess,\ +- CppunitTest_dbaccess_embeddeddb_performancetest \ +-)) +-endif +-endif +- +-$(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\ +- JunitTest_dbaccess_complex \ +- JunitTest_dbaccess_unoapi \ +-)) +- +-ifneq ($(DISABLE_PYTHON),TRUE) +-ifneq ($(ENABLE_JAVA),) +-$(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\ +- PythonTest_dbaccess_python \ +-)) +-endif +-endif +- + # screenshots + $(eval $(call gb_Module_add_screenshot_targets,dbaccess,\ + CppunitTest_dbaccess_dialogs_test \ + )) + +-endif + endif + + # vim: set noet sw=4 ts=4: diff --git a/debian/tests/patches/java-subsequentcheck-standalone.diff b/debian/tests/patches/java-subsequentcheck-standalone.diff new file mode 100644 index 000000000..5cfe53bec --- /dev/null +++ b/debian/tests/patches/java-subsequentcheck-standalone.diff @@ -0,0 +1,126 @@ +From fef2f669c1e861c685d22c18319514cec9f9f8c3 Mon Sep 17 00:00:00 2001 +From: Bjoern Michaelsen <bjoern.michaelsen@canonical.com> +Date: Wed, 28 Jan 2015 12:11:16 +0100 +Subject: [PATCH] run subsequentcheck standalone against installed version as + integration test +Last-Update: 2017-05-17 + +Forwarded: partially, where there is generic use for it +--- + jurt/Module_jurt.mk | 2 +- + postprocess/Module_postprocess.mk | 4 ++-- + solenv/gbuild/JavaClassSet.mk | 2 +- + solenv/gbuild/JunitTest.mk | 2 +- + solenv/gbuild/Module.mk | 3 +++ + solenv/gbuild/extensions/post_SkipBuild.mk | 18 ++++++++++++++++++ + solenv/gbuild/platform/unxgcc.mk | 1 + + 7 files changed, 27 insertions(+), 5 deletions(-) + create mode 100644 solenv/gbuild/extensions/post_SkipBuild.mk + +diff --git a/ridljar/Module_ridljar.mk b/ridljar/Module_ridljar.mk +index daa0f1835be7..c4186e900a87 100644 +--- a/ridljar/Module_ridljar.mk ++++ b/ridljar/Module_ridljar.mk +@@ -16,7 +16,7 @@ $(eval $(call gb_Module_add_targets,ridljar,\ + Jar_unoloader \ + )) + +-$(eval $(call gb_Module_add_check_targets,ridljar,\ ++#$(eval $(call gb_Module_add_check_targets,ridljar,\ + CustomTarget_test_urp \ + InternalUnoApi_test_urp \ + JunitTest_bridgefactory \ +--- a/postprocess/Module_postprocess.mk ++++ b/postprocess/Module_postprocess.mk +@@ -12,13 +12,13 @@ $(eval $(call gb_Module_Module,postproce + # UGLY: postprocess_XCDS variable from CustomTarget_registry + # is reused in Package_registry! + +-$(eval $(call gb_Module_add_targets,postprocess,\ ++#$(eval $(call gb_Module_add_targets,postprocess,\ + CustomTarget_images \ + CustomTarget_registry \ + Package_images \ + Rdb_services \ + )) +-$(eval $(call gb_Module_add_l10n_targets,postprocess,\ ++#$(eval $(call gb_Module_add_l10n_targets,postprocess,\ + Package_registry \ + )) + +diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk +index cff4299bf06e..76765351abdd 100644 +--- a/solenv/gbuild/JavaClassSet.mk ++++ b/solenv/gbuild/JavaClassSet.mk +@@ -46,7 +46,7 @@ $(call gb_Helper_abbreviate_dirs,\ + $(filter-out $(JARDEPS) $(T_JAVA9FILES),$(4))) && \ + $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) \ + $(gb_JavaClassSet_JAVACDEBUG) \ +- -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \ ++ -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))$(gb_CLASSPATHSEP)$(shell echo $(wildcard /usr/lib/libreoffice/program/classes/*.jar) | sed -e s/\ /:/g)" \ + -d $(call gb_JavaClassSet_get_classdir,$(2)) \ + @$$RESPONSEFILE &&) \ + rm -f $$RESPONSEFILE &&) \ +@@ -55,7 +55,7 @@ $(call gb_Helper_abbreviate_dirs,\ + $(T_JAVA9FILES)) && \ + $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,9) \ + $(gb_JavaClassSet_JAVACDEBUG) \ +- -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \ ++ -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))$(gb_CLASSPATHSEP)$(shell echo $(wildcard /usr/lib/libreoffice/program/classes/*.jar) | sed -e s/\ /:/g)" \ + --module-path "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \ + $(if $(T_MODULENAME),--patch-module $(T_MODULENAME)="$(subst $(WHITESPACE),$(gb_CLASSPATHSEP),$(strip $(dir $(PACKAGEDIRS))))") \ + -d $(call gb_JavaClassSet_get_classdir,$(2)) \ +--- a/solenv/gbuild/JunitTest.mk ++++ b/solenv/gbuild/JunitTest.mk +@@ -55,7 +55,7 @@ $(call gb_JunitTest_get_target,%) : + endif + + define gb_JunitTest_JunitTest +-$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(if $(HAMCREST_JAR),$$(gb_CLASSPATHSEP)$(HAMCREST_JAR))$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_URE_LIB_FOLDER) ++$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(if $(HAMCREST_JAR),$$(gb_CLASSPATHSEP)$(HAMCREST_JAR))$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_URE_LIB_FOLDER)$(gb_CLASSPATHSEP)$(shell echo $(wildcard /usr/lib/libreoffice/program/classes/*.jar) | sed -e s/\ /:/g) + $(call gb_JunitTest_get_target,$(1)) : CLASSES := + $(eval $(call gb_JunitTest_JunitTest_platform,$(1))) + +--- a/solenv/gbuild/Module.mk ++++ b/solenv/gbuild/Module.mk +@@ -336,15 +336,16 @@ endef + # has order dependency on AllModulesButInstsetNative to be able to run + # subsequentcheck in the same make process on "make check" + define gb_Module_add_subsequentcheck_target ++ifeq (,$(filter-out JavaClassSet% JunitTest%,$(2))) + $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target) + + $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET) + $$(gb_Module_CURRENTTARGET) :| \ +- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \ +- $(call gb_Package_get_target,instsetoo_native_setup) \ +- $(call gb_Package_get_target,instsetoo_native_setup_ure) ++ $(call gb_Postprocess_get_target,AllModulesButInstsetNative) + $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) + ++endif ++ + endef + + define gb_Module_add_stagingcheck_target +--- /dev/null ++++ b/solenv/gbuild/extensions/post_SkipBuild.mk +@@ -0,0 +1,18 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++# we dont want to bother with these for integration tests ++gb_Module_add_target = ++gb_Module_add_l10n_target = ++gb_Module_add_check_target = ++gb_Module_add_slowcheck_target = ++gb_JavaClassSet_use_jar = ++gb_JunitTest_use_jar = ++ ++# vim: set noet sw=4 ts=4: diff --git a/debian/tests/patches/odk-build-examples-standalone.diff b/debian/tests/patches/odk-build-examples-standalone.diff new file mode 100644 index 000000000..f7c11ec66 --- /dev/null +++ b/debian/tests/patches/odk-build-examples-standalone.diff @@ -0,0 +1,50 @@ +diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk +index 931d6eea856e..2749b6930079 100644 +--- a/odk/build-examples_common.mk ++++ b/odk/build-examples_common.mk +@@ -29,7 +29,7 @@ endif + && export \ + UserInstallation=$(call gb_Helper_make_url,$(call gb_CustomTarget_get_workdir,$(1))/user) \ + $(foreach my_dir,$(2), \ +- && (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \ ++ && (cd /usr/lib/libreoffice/sdk/examples/$(my_dir) \ + && printf 'yes\n' | LC_ALL=C make \ + $(if $(filter MACOSX,$(OS)), SHELL=$(ODK_BUILD_SHELL), )))) \ + >$(call gb_CustomTarget_get_workdir,$(1))/log 2>&1 \ +@@ -43,17 +43,17 @@ endif + endif + + $(call gb_CustomTarget_get_workdir,$(1))/setsdkenv: \ +- $(SRCDIR)/odk/config/setsdkenv_unix.sh.in \ ++ /usr/lib/libreoffice/sdk//setsdkenv_unix.sh.in \ + $(BUILDDIR)/config_$(gb_Side).mk | \ + $(call gb_CustomTarget_get_workdir,$(1))/.dir + $$(call gb_Output_announce,$(subst $(WORKDIR)/,,$(1)),$(true),SED,1) + sed -e 's!@OO_SDK_NAME@!sdk!' \ +- -e 's!@OO_SDK_HOME@!$(INSTDIR)/$(SDKDIRNAME)!' \ +- -e 's!@OFFICE_HOME@!$(INSTROOTBASE)!' -e 's!@OO_SDK_MAKE_HOME@!!' \ ++ -e 's!@OO_SDK_HOME@!/usr/lib/libreoffice/sdk!' \ ++ -e 's!@OFFICE_HOME@!/usr/lib/libreoffice!' -e 's!@OO_SDK_MAKE_HOME@!!' \ + -e 's!@OO_SDK_ZIP_HOME@!!' -e 's!@OO_SDK_CAT_HOME@!!' \ + -e 's!@OO_SDK_SED_HOME@!!' -e 's!@OO_SDK_CPP_HOME@!!' \ + -e 's!@OO_SDK_JAVA_HOME@!$(JAVA_HOME)!' \ +- -e 's!@OO_SDK_OUTPUT_DIR@!$(call gb_CustomTarget_get_workdir,$(1))/out!' \ ++ -e 's!@OO_SDK_OUTPUT_DIR@!$(shell mktemp -q -d)/out!' \ + -e 's!@SDK_AUTO_DEPLOYMENT@!YES!' $$< > $$@ + + .PHONY: $(call gb_CustomTarget_get_target,$(1)) +diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk +index 4073dcfd9bf5..68c17ce0d1ed 100644 +--- a/solenv/gbuild/Module.mk ++++ b/solenv/gbuild/Module.mk +@@ -339,10 +339,6 @@ define gb_Module_add_subsequentcheck_target + $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target) + + $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET) +-$$(gb_Module_CURRENTTARGET) :| \ +- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \ +- $(call gb_Package_get_target,instsetoo_native_setup) \ +- $(call gb_Package_get_target,instsetoo_native_setup_ure) + $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) + + endef diff --git a/debian/tests/patches/smoketest-disable-extension-tests.diff b/debian/tests/patches/smoketest-disable-extension-tests.diff new file mode 100644 index 000000000..0b5ee3b3a --- /dev/null +++ b/debian/tests/patches/smoketest-disable-extension-tests.diff @@ -0,0 +1,98 @@ +--- smoketest/data/Basic/Standard/Test_Ext.xml 2012-02-01 13:56:49.000000000 +0100 ++++ smoketest/data/Basic/Standard/Test_Ext.xml 2012-02-20 20:15:23.000000000 +0100 +@@ -28,10 +28,6 @@ + <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_Ext" script:language="StarBasic">REM ***** BASIC ***** + +-const cMessageExtensionService = "Extension Service" +-const cMessageExtensionInstall = "Install Extension" +-const cMessageExtensionUninstall = "Uninstall Extension" +- + Sub TestExtensions + Dim oTestExtension as Object, obj_null as Object + Dim sCurrentMessage as String +@@ -37,9 +37,6 @@ + Dim sCurrentMessage as String + Dim bResult as Boolean + Dim sImplementationNameString as String +- sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension" +- +- On Local Error GoTo EXTERROR + + gCurrentTestCase = cLogfileFailed + LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest)) +@@ -35,74 +35,5 @@ + gCurrentTestCase = cLogfileFailed + LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest)) + +- sCurrentMessage = "SmokeTestCommandEnvironment (implemented in Java)" +- gCurrentTestCase = cEXTService +- +- 'Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for +- 'adding the extension. The implementation is in +- 'smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java and the code is in smoketest.jar +- cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment) +- +- 'Create the component context and then get the singleton ExtensionManager +- 'A singleton cannot be created with createUnoService +- sCurrentMessage = cMessageExtensionService +- ctx = getDefaultContext +- ext_mgr = ctx.getValueByName("/singletons/" + cExtensionManager) +- +- LogTestResult( "Extension "+ cMessageExtensionService, not IsNull (ext_mgr) ) +- if (IsNull(ext_mgr)) then +- Close #LocalTestLog% +- LocalTestLog = 0 +- Exit Sub +- End If +- +- sCurrentMessage = cMessageExtensionInstall +- gCurrentTestCase = cEXTInstall +- +- 'Add the extension. We must provide a file URL here. +- 'By passing "user" we determine that the actions we perform on +- 'XExtensionManager only affect the user installation. To modify the share installation one would pass "share". +- +- Dim props() as Object +- ext_mgr.addExtension(sExtensionURL, props, "user", obj_null, cmdEnv) +- +- 'Check if the extension has been added by creating a service which is contained in the extension. +- oTestExtension = createUnoService(cUnoSmoketestTestExtension) +- bResult = (oTestExtension.getImplementationName = sImplementationNameString) +- LogTestResult( "Extension "+ cMessageExtensionInstall, bResult ) +- if (not bResult) then +- Close #LocalTestLog% +- LocalTestLog = 0 +- Exit Sub +- End If +- +- sCurrentMessage = cMessageExtensionUninstall +- gCurrentTestCase = cEXTUninstall +- +- 'Remove the package +- ext_mgr.removeExtension("org.libreoffice.smoketest.TestExtension", cExtensionFileName, "user",obj_null, cmdEnv) +- +- 'Try to create the service which is contained in the now removed extension. +- oTestExtension = createUnoService(cUnoSmoketestTestExtension) +- +- 'The service must not be available anymore. Therefore isNull must return true. +- LogTestResult( "Extension "+ cMessageExtensionUninstall, IsNull (oTestExtension) ) +- +- Print #LocalTestLog, "---" +- Close #LocalTestLog% +- LocalTestLog = 0 +- Exit Sub ' Without error +- +- EXTERROR: +- If ( gCurrentTestCase = cLogfileFailed ) then +- LogTestResult( " ", False ) +- Exit Sub +- else +- LogTestResult( "Extension "+ sCurrentMessage, False ) +- Close #LocalTestLog% +- LocalTestLog = 0 +- End If +- Exit Sub ' With error +- + End Sub + </script:module> diff --git a/debian/tests/patches/smoketest-standalone.diff b/debian/tests/patches/smoketest-standalone.diff new file mode 100644 index 000000000..8d82fd00d --- /dev/null +++ b/debian/tests/patches/smoketest-standalone.diff @@ -0,0 +1,32 @@ +diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk +index f7d64cae562f..9d47776ffb4b 100644 +--- a/smoketest/CppunitTest_smoketest.mk ++++ b/smoketest/CppunitTest_smoketest.mk +@@ -34,10 +34,10 @@ userinstallation=$(WORKDIR)/CustomTarget/smoketest + endif + + $(eval $(call gb_CppunitTest_add_arguments,smoketest,\ +- -env:arg-soffice=$(gb_JunitTest_SOFFICEARG) \ ++ -env:arg-soffice=$(OOO_TEST_SOFFICE) \ + -env:arg-user=$(userinstallation) \ + -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \ +- -env:arg-testarg.smoketest.doc=$(WORKDIR)/Zip/smoketestdoc.sxw \ ++ -env:arg-testarg.smoketest.doc=/usr/share/libreoffice/smoketestdoc.sxw \ + )) + + $(call gb_CppunitTest_get_target,smoketest): \ +diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk +index 0d87ccc55379..41c6564d3d7e 100644 +--- a/solenv/gbuild/Module.mk ++++ b/solenv/gbuild/Module.mk +@@ -338,10 +338,6 @@ define gb_Module_add_subsequentcheck_target + $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target) + + $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET) +-$$(gb_Module_CURRENTTARGET) :| \ +- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \ +- $(call gb_Package_get_target,instsetoo_native_setup) \ +- $(call gb_Package_get_target,instsetoo_native_setup_ure) + $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) + + endef diff --git a/debian/tests/patches/testtools-standalone.diff b/debian/tests/patches/testtools-standalone.diff new file mode 100644 index 000000000..a6fd5dd20 --- /dev/null +++ b/debian/tests/patches/testtools-standalone.diff @@ -0,0 +1,227 @@ +diff --git a/testtools/CustomTarget_bridgetest.mk b/testtools/CustomTarget_bridgetest.mk +index d090146ec411..1cb4d30dcc2a 100644 +--- a/testtools/CustomTarget_bridgetest.mk ++++ b/testtools/CustomTarget_bridgetest.mk +@@ -28,7 +28,7 @@ $(testtools_BRIDGEDIR)/bridgetest_server$(testtools_BATCHSUFFIX) :| $(testtools_ + $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) + $(call gb_Helper_abbreviate_dirs,\ + echo \ +- "$(call gb_Executable_get_target_for_build,uno)" \ ++ "/usr/lib/libreoffice/program/uno" \ + "-s com.sun.star.test.bridge.CppTestObject" \ + "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \ + "--singleaccept" \ +@@ -59,7 +59,7 @@ $(testtools_BRIDGEDIR)/bridgetest_inprocess_java$(testtools_BATCHSUFFIX) :| $(te + $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) + $(call gb_Helper_abbreviate_dirs,\ + echo "JAVA_HOME=$(JAVA_HOME)" \ +- "$(call gb_Executable_get_target_for_build,uno)" \ ++ "/usr/lib/libreoffice/program/uno" \ + "-s com.sun.star.test.bridge.BridgeTest" \ + "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \ + "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \ +@@ -72,7 +72,7 @@ $(testtools_BRIDGEDIR)/bridgetest_client$(testtools_BATCHSUFFIX) :| $(testtools_ + $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) + $(call gb_Helper_abbreviate_dirs,\ + echo \ +- "$(call gb_Executable_get_target_for_build,uno)" \ ++ "/usr/lib/libreoffice/program/uno" \ + "-s com.sun.star.test.bridge.BridgeTest --" \ + "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \ + "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \ +diff --git a/testtools/CustomTarget_uno_test.mk b/testtools/CustomTarget_uno_test.mk +index 4850e5ca66b2..610a0b170e90 100644 +--- a/testtools/CustomTarget_uno_test.mk ++++ b/testtools/CustomTarget_uno_test.mk +@@ -12,18 +12,12 @@ $(eval $(call gb_CustomTarget_CustomTarget,testtools/uno_test)) + # this target is phony to run it every time + .PHONY : $(call gb_CustomTarget_get_target,testtools/uno_test) + +-$(call gb_CustomTarget_get_target,testtools/uno_test) : \ +- $(call gb_Executable_get_runtime_dependencies,uno) \ +- $(call gb_InternalUnoApi_get_target,bridgetest) \ +- $(call gb_Package_get_target,instsetoo_native_setup_ure) \ +- $(call gb_Rdb_get_target,uno_services) \ +- $(call gb_Rdb_get_target,ure/services) \ +- $(call gb_UnoApi_get_target,udkapi) ++$(call gb_CustomTarget_get_target,testtools/uno_test) : + ifneq ($(gb_SUPPRESS_TESTS),) + @true + else + $(call gb_Helper_abbreviate_dirs,\ +- $(call gb_Executable_get_command,uno) \ ++ /usr/lib/libreoffice/program/uno \ + -s com.sun.star.test.bridge.BridgeTest \ + -- com.sun.star.test.bridge.CppTestObject \ + -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \ +#diff --git a/testtools/Library_bridgetest-common.mk b/testtools/Library_bridgetest-common.mk +#index 1ca38bca6b49..cbc793c36d39 100644 +#--- a/testtools/Library_bridgetest-common.mk +#+++ b/testtools/Library_bridgetest-common.mk +#@@ -20,16 +20,6 @@ $(eval $(call gb_Library_use_internal_api,testtools_bridgetest-common,\ +# bridgetest \ +# )) +# +#-$(eval $(call gb_Library_use_libraries,testtools_bridgetest-common, \ +#- cppu \ +#- cppuhelper \ +#- sal \ +#-)) +#- +#-$(eval $(call gb_Library_use_api,testtools_bridgetest-common,\ +#- udkapi \ +#-)) +#- +# $(eval $(call gb_Library_add_exception_objects,testtools_bridgetest-common,\ +# testtools/source/bridgetest/currentcontextchecker \ +# testtools/source/bridgetest/multi \ +#diff --git a/testtools/Library_bridgetest.mk b/testtools/Library_bridgetest.mk +#index 52f335761fdf..f0bafca0998f 100644 +#--- a/testtools/Library_bridgetest.mk +#+++ b/testtools/Library_bridgetest.mk +#@@ -15,16 +15,9 @@ $(eval $(call gb_Library_use_internal_api,testtools_bridgetest,\ +# bridgetest \ +# )) +# +#-$(eval $(call gb_Library_use_api,testtools_bridgetest,\ +#- udkapi \ +#-)) +#- +# $(eval $(call gb_Library_use_external,testtools_bridgetest,boost_headers)) +# +# $(eval $(call gb_Library_use_libraries,testtools_bridgetest,\ +#- cppu \ +#- cppuhelper \ +#- sal \ +# testtools_bridgetest-common \ +# )) +# +#diff --git a/testtools/Library_constructors.mk b/testtools/Library_constructors.mk +#index 516c05d62db8..3a2a4b8bca24 100644 +#--- a/testtools/Library_constructors.mk +#+++ b/testtools/Library_constructors.mk +#@@ -22,16 +22,6 @@ $(eval $(call gb_Library_use_internal_api,testtools_constructors,\ +# bridgetest \ +# )) +# +#-$(eval $(call gb_Library_use_api,testtools_constructors,\ +#- udkapi \ +#-)) +#- +#-$(eval $(call gb_Library_use_libraries,testtools_constructors,\ +#- cppu \ +#- cppuhelper \ +#- sal \ +#-)) +#- +# $(eval $(call gb_Library_add_exception_objects,testtools_constructors,\ +# testtools/source/bridgetest/constructors \ +# )) +#diff --git a/testtools/Library_cppobj.mk b/testtools/Library_cppobj.mk +#index 086b1fa0b6f5..9348254b6da8 100644 +#--- a/testtools/Library_cppobj.mk +#+++ b/testtools/Library_cppobj.mk +#@@ -20,16 +20,9 @@ $(eval $(call gb_Library_use_internal_api,testtools_cppobj,\ +# bridgetest \ +# )) +# +#-$(eval $(call gb_Library_use_api,testtools_cppobj,\ +#- udkapi \ +#-)) +#- +# $(eval $(call gb_Library_use_external,testtools_cppobj,boost_headers)) +# +# $(eval $(call gb_Library_use_libraries,testtools_cppobj,\ +#- cppu \ +#- cppuhelper \ +#- sal \ +# testtools_bridgetest-common \ +# )) +# +#diff --git a/unoidl/Executable_unoidl-check.mk b/unoidl/Executable_unoidl-check.mk +#index 36dfc44de635..a1bb6ed14d80 100644 +#--- a/unoidl/Executable_unoidl-check.mk +#+++ b/unoidl/Executable_unoidl-check.mk +#@@ -15,10 +15,13 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-check, \ +# +# $(eval $(call gb_Executable_use_libraries,unoidl-check, \ +# unoidl \ +#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ +#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ +#- salhelper \ +#- sal \ +#+)) +#+ +#+$(eval $(call gb_Executable_add_ldflags,unoidl-check, \ +#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lreglo) \ +#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lstorelo) \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \ +# )) +# +# # vim: set noet sw=4 ts=4: +#diff --git a/unoidl/Executable_unoidl-read.mk b/unoidl/Executable_unoidl-read.mk +#index b134c30b1a72..2bfd0ea3057f 100644 +#--- a/unoidl/Executable_unoidl-read.mk +#+++ b/unoidl/Executable_unoidl-read.mk +#@@ -15,10 +15,13 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-read, \ +# +# $(eval $(call gb_Executable_use_libraries,unoidl-read, \ +# unoidl \ +#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ +#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ +#- salhelper \ +#- sal \ +#+)) +#+ +#+$(eval $(call gb_Executable_add_ldflags,unoidl-read, \ +#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lreglo) \ +#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lstorelo) \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \ +# )) +# +# # vim: set noet sw=4 ts=4: +#diff --git a/unoidl/Executable_unoidl-write.mk b/unoidl/Executable_unoidl-write.mk +#index 9accb31ac14d..f69d78a09c32 100644 +#--- a/unoidl/Executable_unoidl-write.mk +#+++ b/unoidl/Executable_unoidl-write.mk +#@@ -15,10 +15,15 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-write, \ +# +# $(eval $(call gb_Executable_use_libraries,unoidl-write, \ +# unoidl \ +#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ +#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ +#- salhelper \ +#- sal \ +# )) +# +#+$(eval $(call gb_Executable_add_ldflags,unoidl-write, \ +#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lreglo) \ +#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lstorelo) \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \ +#+)) +#+ +#+ +#+ +# # vim: set noet sw=4 ts=4: +#diff --git a/unoidl/Library_unoidl.mk b/unoidl/Library_unoidl.mk +#index c98fc69f4945..bdc8285fe234 100644 +#--- a/unoidl/Library_unoidl.mk +#+++ b/unoidl/Library_unoidl.mk +#@@ -32,10 +32,10 @@ $(eval $(call gb_Library_set_include,unoidl, \ +# -I$(SRCDIR)/unoidl/source \ +# )) +# +#-$(eval $(call gb_Library_use_libraries,unoidl, \ +#- reg \ +#- sal \ +#- salhelper \ +#+$(eval $(call gb_Library_add_libs,unoidl, \ +#+ -L/usr/lib/libreoffice/program/ -lreglo \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \ +#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \ +# )) +# +# # vim: set noet sw=4 ts=4: diff --git a/debian/tests/patches/uicheck-standalone.diff b/debian/tests/patches/uicheck-standalone.diff new file mode 100644 index 000000000..f33556ecd --- /dev/null +++ b/debian/tests/patches/uicheck-standalone.diff @@ -0,0 +1,69 @@ +diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk +index cebb030a12cd..88ec5499dcbd 100644 +--- a/solenv/gbuild/UITest.mk ++++ b/solenv/gbuild/UITest.mk +@@ -34,7 +34,7 @@ ifneq ($(gb_UITest_DEBUGRUN),) + gb_UITest_SOFFICEARG:=connect:pipe,name=$(USER) + gb_UITest__interactive := $(true) + else +-gb_UITest_SOFFICEARG:=path:$(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice ++gb_UITest_SOFFICEARG:=$(OOO_TEST_SOFFICE) + endif + + gb_UITest_COMMAND := LIBO_LANG=en_US.UTF-8 $(gb_UITest_EXECUTABLE) $(SRCDIR)/uitest/test_main.py +@@ -65,8 +65,8 @@ else + $(DEFS) \ + SAL_LOG_FILE="$(dir $(call gb_UITest_get_target,$*))/soffice.out.log" \ + TEST_LIB=$(call gb_Library_get_target,test) \ +- URE_BOOTSTRAP=vnd.sun.star.pathname:$(call gb_Helper_get_rcfile,$(INSTROOT)/$(LIBO_ETC_FOLDER)/fundamental) \ +- PYTHONPATH="$(PYPATH)" \ ++ URE_BOOTSTRAP=vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc \ ++ PYTHONPATH="$(filter-out $I/program,$(PYPATH):/usr/lib/libreoffice/program)" \ + TestUserDir="$(call gb_Helper_make_url,$(dir $(call gb_UITest_get_target,$*)))" \ + PYTHONDONTWRITEBYTECODE=0 \ + $(if $(ENABLE_WERROR),PYTHONWARNINGS=error) \ +@@ -95,7 +95,6 @@ define gb_UITest_UITest + $(call gb_UITest_get_target,$(1)) : PYPATH := $(SRCDIR)/uitest$$(gb_CLASSPATHSEP)$(SRCDIR)/unotest/source/python$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_LIB_PYUNO_FOLDER)$(if $(filter-out $(LIBO_LIB_PYUNO_FOLDER),$(LIBO_LIB_FOLDER)),$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_LIB_FOLDER)) + $(call gb_UITest_get_target,$(1)) : MODULES := + +-$(eval $(call gb_TestHelpers_use_more_fonts,$(call gb_UITest_get_target,$(1)))) + $(eval $(call gb_Module_register_target,$(call gb_UITest_get_target,$(1)),$(call gb_UITest_get_clean_target,$(1)))) + $(call gb_Helper_make_userfriendly_targets,$(1),UITest) + +-- +2.20.1 + +diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk +index 4073dcfd9bf5..856f5efee988 100644 +--- a/solenv/gbuild/Module.mk ++++ b/solenv/gbuild/Module.mk +@@ -201,7 +201,7 @@ perfcheck : + $(call gb_Output_announce_title,all perftests checked.) + $(call gb_Output_announce_bell) + +-uicheck : build ++uicheck : + $(if $(gb_VERBOSE),$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),UIT,6)) + $(call gb_Output_announce_title,all uicheck checked.) + $(call gb_Output_announce_bell) +@@ -372,11 +372,6 @@ define gb_Module_add_uicheck_target + $(call gb_Module__read_targetfile,$(1),$(2),uicheck target) + + $(call gb_Module_get_uicheck_target,$(1)) : $$(gb_Module_CURRENTTARGET) +-$$(gb_Module_CURRENTTARGET) :| \ +- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \ +- $(call gb_Package_get_target,instsetoo_native_setup) \ +- $(call gb_Package_get_target,instsetoo_native_setup_ure) +-$(call gb_Module_get_uicheck_target,$(1)) : $$(gb_Module_CURRENTTARGET) + $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) + + endef +@@ -479,7 +474,7 @@ endif + subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) + stagingcheck : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK)) + perfcheck : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK)) +-uicheck : build $$(firstword $$(gb_Module_UICHECKTARGETSTACK)) ++uicheck : $$(firstword $$(gb_Module_UICHECKTARGETSTACK)) + clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK)) + + ifneq ($$(words $$(gb_Module_TARGETSTACK)),1) diff --git a/debian/tests/pyuno-import b/debian/tests/pyuno-import new file mode 100755 index 000000000..9820a90e6 --- /dev/null +++ b/debian/tests/pyuno-import @@ -0,0 +1,8 @@ +#!/usr/bin/python3 + +import sys, os +sys.path.append('/usr/lib/libreoffice/program') +os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc') + +import pyuno +print(pyuno) diff --git a/debian/tests/smoketest b/debian/tests/smoketest new file mode 100755 index 000000000..d52f8fa09 --- /dev/null +++ b/debian/tests/smoketest @@ -0,0 +1,87 @@ +#!/bin/bash +# autopkgtest check: Run smoketest against an installed version of LibreOffice +# (c) 2018 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + TMP=`mktemp -q -p $AUTOPKGTEST_TMP` + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + TMP=`mktemp -q` + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + cd $SRCDIR + echo + echo "====== Unapplying the patches ======" + patch -p1 -R < ./debian/tests/patches/smoketest-standalone.diff + patch -p0 -R < ./debian/tests/patches/smoketest-disable-extension-tests.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to only build the smoketest unittest against an existing installation ======" +patch -p1 < ./debian/tests/patches/smoketest-standalone.diff +patch -p0 < ./debian/tests/patches/smoketest-disable-extension-tests.diff + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +# FIXME: GROSS HACK. +echo +echo "====== Building needed parts of LibreOffice ======" +./debian/rules config_host.mk ENABLE_PDFIUM=n ENABLE_MERGELIBS=n BUILD_GTK=n BUILD_GTK3=n BUILD_KDE=n +cat << EOF >> $TMP +export gb_SUPPRESS_TESTS=true +make test.all verbose=t +make bridges.all verbose=t +make javaunohelper.all verbose=t +make unoil.all verbose=t +make unotest.all verbose=t +make ure.all verbose=t +make i18npool.all verbose=t +EOF +chmod 755 $TMP +#TIMEOUT OPTIONS +# --timeout-which=seconds +# Use a different timeout for operations on or with the testbed. +# There are five timeouts affected by five values of which: short: +# supposedly short operations like setting up the testbed's apt +# and checking the state (default: 100s); install: installation of +# packages including dependencies (default: 3,000s); test: test +# runs (default: 10,000s); copy: copy files/directories between +# host and testbed (default: 300s); and build: builds (default: +# 100,000s). The value must be specified as an integer number of +# seconds. +# 10000s = 160 min. so we have enough time to actually run the test :) +timeout 150m $TMP || \ + if test "$?" = "124"; then rm -f $TMP; exit 77; \ + else exit $?; fi + +rm -f $TMP + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting smoketest with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +export PARALLELISM=$CHECK_PARALLELISM + +export LD_LIBRARY_PATH=/usr/lib/libreoffice/program:$LD_LIBRARY_PATH +cd smoketest && make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + CppunitTest_smoketest INSTDIR=/usr/lib/libreoffice verbose=t + +cd $SRCDIR + +unapply + diff --git a/debian/tests/test-extension b/debian/tests/test-extension new file mode 100755 index 000000000..1654262fe --- /dev/null +++ b/debian/tests/test-extension @@ -0,0 +1,33 @@ +#!/bin/bash +# autopkgtest check: Install a test extension (as smoketest would do) +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +if [ -n "$AUTOPKGTEST_TMP" ]; then + TMP=`mktemp -q -p $AUTOPKGTEST_TMP` +else + TMP=`mktemp -q` +fi + +echo +echo "====== Add the extension ======" +# does it install fine? +unopkg add -v /usr/share/libreoffice/TestExtension.oxt + +echo +echo "====== Show extension status ======" +# does it list? For whatever reason unopkg leaves a stale .lock behind when +# doing this grep directly on the output so do it on a tmpfile +unopkg list | tee $TMP +grep -q org.libreoffice.smoketest.TestExtension $TMP || exit 1 +rm $TMP + +echo +echo "====== Remove the extension ======" +# does it remove? +unopkg remove -v org.libreoffice.smoketest.TestExtension + + diff --git a/debian/tests/test-extension-shared b/debian/tests/test-extension-shared new file mode 100755 index 000000000..f9d794163 --- /dev/null +++ b/debian/tests/test-extension-shared @@ -0,0 +1,34 @@ +#!/bin/bash +# autopkgtest check: Install a test extension shared +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +if [ -n "$AUTOPKGTEST_TMP" ]; then + TMP=`mktemp -q -p $AUTOPKGTEST_TMP` +else + TMP=`mktemp -q` +fi + + +echo +echo "====== Add the extension ======" +# does it install fine? +unopkg add --shared -v /usr/share/libreoffice/TestExtension.oxt + +echo +echo "====== Show extension status ======" +# does it list? For whatever reason unopkg leaves a stale .lock behind when +# doing this grep directly on the output so do it on a tmpfile +unopkg list --shared | tee $TMP +grep -q org.libreoffice.smoketest.TestExtension $TMP || exit 1 +rm $TMP + +echo +echo "====== Remove the extension ======" +# does it remove? +unopkg remove --shared -v org.libreoffice.smoketest.TestExtension + + diff --git a/debian/tests/uicheck-cui b/debian/tests/uicheck-cui new file mode 100755 index 000000000..041f00f99 --- /dev/null +++ b/debian/tests/uicheck-cui @@ -0,0 +1,61 @@ +#!/bin/bash +# autopkgtest check: Run uicheck against an installed version of LibreOffice +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build uicheck against an existing installation ======" +patch -p1 < ./debian/tests/patches/uicheck-standalone.diff + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +echo +echo "====== Generating en_US.UTF-8 locale ======" +cd $WORKDIR +$SRCDIR/debian/scripts/locale-gen + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +cd $SRCDIR +export PARALLELISM=$CHECK_PARALLELISM +export LOCPATH=$WORKDIR/debian/locales +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + cui.uicheck verbose=t + +unapply + diff --git a/debian/tests/uicheck-sc b/debian/tests/uicheck-sc new file mode 100755 index 000000000..998018350 --- /dev/null +++ b/debian/tests/uicheck-sc @@ -0,0 +1,61 @@ +#!/bin/bash +# autopkgtest check: Run uicheck against an installed version of LibreOffice +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build uicheck against an existing installation ======" +patch -p1 < ./debian/tests/patches/uicheck-standalone.diff + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +echo +echo "====== Generating en_US.UTF-8 locale ======" +cd $WORKDIR +$SRCDIR/debian/scripts/locale-gen + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +cd $SRCDIR +export PARALLELISM=$CHECK_PARALLELISM +export LOCPATH=$WORKDIR/debian/locales +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + sc.uicheck verbose=t + +unapply + diff --git a/debian/tests/uicheck-sd b/debian/tests/uicheck-sd new file mode 100755 index 000000000..1e363be23 --- /dev/null +++ b/debian/tests/uicheck-sd @@ -0,0 +1,61 @@ +#!/bin/bash +# autopkgtest check: Run uicheck against an installed version of LibreOffice +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build uicheck against an existing installation ======" +patch -p1 < ./debian/tests/patches/uicheck-standalone.diff + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +echo +echo "====== Generating en_US.UTF-8 locale ======" +cd $WORKDIR +$SRCDIR/debian/scripts/locale-gen + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +cd $SRCDIR +export PARALLELISM=$CHECK_PARALLELISM +export LOCPATH=$WORKDIR/debian/locales +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + sd.uicheck verbose=t + +unapply + diff --git a/debian/tests/uicheck-sw b/debian/tests/uicheck-sw new file mode 100755 index 000000000..666f6442c --- /dev/null +++ b/debian/tests/uicheck-sw @@ -0,0 +1,61 @@ +#!/bin/bash +# autopkgtest check: Run uicheck against an installed version of LibreOffice +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build uicheck against an existing installation ======" +patch -p1 < ./debian/tests/patches/uicheck-standalone.diff + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +echo +echo "====== Generating en_US.UTF-8 locale ======" +cd $WORKDIR +$SRCDIR/debian/scripts/locale-gen + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +cd $SRCDIR +export PARALLELISM=$CHECK_PARALLELISM +export LOCPATH=$WORKDIR/debian/locales +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + sw.uicheck verbose=t + +unapply + diff --git a/debian/tests/uicheck-uitest b/debian/tests/uicheck-uitest new file mode 100755 index 000000000..0995d2eac --- /dev/null +++ b/debian/tests/uicheck-uitest @@ -0,0 +1,61 @@ +#!/bin/bash +# autopkgtest check: Run uicheck against an installed version of LibreOffice +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build uicheck against an existing installation ======" +patch -p1 < ./debian/tests/patches/uicheck-standalone.diff + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +echo +echo "====== Generating en_US.UTF-8 locale ======" +cd $WORKDIR +$SRCDIR/debian/scripts/locale-gen + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +cd $SRCDIR +export PARALLELISM=$CHECK_PARALLELISM +export LOCPATH=$WORKDIR/debian/locales +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + uitest.uicheck verbose=t + +unapply + diff --git a/debian/tests/uicheck-writerperfect b/debian/tests/uicheck-writerperfect new file mode 100755 index 000000000..8239e590c --- /dev/null +++ b/debian/tests/uicheck-writerperfect @@ -0,0 +1,61 @@ +#!/bin/bash +# autopkgtest check: Run uicheck against an installed version of LibreOffice +# (c) 2017 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + echo + echo "====== Unapplying the patch ======" + patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to build uicheck against an existing installation ======" +patch -p1 < ./debian/tests/patches/uicheck-standalone.diff + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +echo +echo "====== Generating en_US.UTF-8 locale ======" +cd $WORKDIR +$SRCDIR/debian/scripts/locale-gen + +OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}" + +echo +echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======" + +cd $SRCDIR +export PARALLELISM=$CHECK_PARALLELISM +export LOCPATH=$WORKDIR/debian/locales +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +make -rk \ + OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \ + writerperfect.uicheck verbose=t + +unapply + diff --git a/debian/tests/uno b/debian/tests/uno new file mode 100755 index 000000000..5f097b83a --- /dev/null +++ b/debian/tests/uno @@ -0,0 +1,55 @@ +#!/bin/bash +# autopkgtest check: Run UNO tests against an installed version of the URE +# (c) 2018 Software in the Public Interest, Inc. +# Authors: Rene Engelhard <rene@debian.org> + +set -e +set -E + +SRCDIR=`pwd` +CHECK_PARALLELISM=1 +if [ -n "$AUTOPKGTEST_TMP" ]; then + TMP=`mktemp -q -p $AUTOPKGTEST_TMP` + WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP` +else + TMP=`mktemp -q` + WORKDIR=`mktemp -q -d` +fi + +function unapply() { + cd $SRCDIR + echo + echo "====== Unapplying the patches ======" + patch -p1 -R < ./debian/tests/patches/testtools-standalone.diff +} + +trap "unapply" ERR + +echo +echo "====== Patching the tree to only build the testtools unittest against an existing installation ======" +patch -p1 < ./debian/tests/patches/testtools-standalone.diff + +echo +echo "====== Enabling core dumps ======" +# yes, we want core dumps and stack traces +ulimit -c unlimited + +# this normally shouldn't be needed but otherwise it wants a automatic +# re-autogen. +echo +echo "====== Generating configuration =======" +rm -f config_host.mk +./debian/rules config_host.mk ENABLE_PDFIUM=n ENABLE_MERGELIBS=n BUILD_GTK=n BUILD_GTK3=n BUILD_KDE=n + +echo +echo "====== Starting uno test with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/program/uno ======" + +export PARALLELISM=$CHECK_PARALLELISM + +export LD_LIBRARY_PATH=/usr/lib/libreoffice/program:$LD_LIBRARY_PATH +make testtools.all verbose=t + +cd $SRCDIR + +unapply + diff --git a/debian/tests/uno-import b/debian/tests/uno-import new file mode 100755 index 000000000..e36ab16f9 --- /dev/null +++ b/debian/tests/uno-import @@ -0,0 +1,4 @@ +#!/usr/bin/python3 + +import uno +print(uno) |