[libreoffice] 01/02: add test-extension tests to testinstall a extension based on smoketests TextExtension.oxt

Rene Engelhard rene at moszumanska.debian.org
Mon Dec 18 22:33:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch debian-experimental-6.1
in repository libreoffice.

commit 625793e5319e614596e722a0f5b6cfd5bd4f3b1b
Author: Rene Engelhard <rene at debian.org>
Date:   Sun Dec 17 22:11:31 2017 +0000

    add test-extension tests to testinstall a extension based on smoketests TextExtension.oxt
---
 changelog                      |  6 ++++++
 control                        |  8 +++++++-
 control.subsequentcheckbase.in |  7 -------
 control.test-packages.in       | 13 +++++++++++++
 rules                          | 26 +++++++++++++++++---------
 tests/control                  | 10 ++++++++++
 tests/test-extension           | 23 +++++++++++++++++++++++
 tests/test-extension-shared    | 23 +++++++++++++++++++++++
 8 files changed, 99 insertions(+), 17 deletions(-)

diff --git a/changelog b/changelog
index d456b9d..cf1f422 100644
--- a/changelog
+++ b/changelog
@@ -2,6 +2,12 @@ libreoffice (1:6.1.0~alpha1~git20171216-1) UNRELEASED; urgency=medium
 
   * New upstream snapshot
 
+  * debian/rules:
+    - install smoketestdoc.sxw and TestExtension.oxt into a new
+      libreoffice-smoketest package which can be used by autopkgtests
+  * debian/tests/*: add autopkgtest to test install TestExtension.oxt
+    (user and shared)
+
  -- Rene Engelhard <rene at debian.org>  Tue, 07 Nov 2017 20:59:01 +0100
 
 libreoffice (1:6.0.0~beta2-1) experimental; urgency=medium
diff --git a/control b/control
index c8d9016..2a12bc8 100644
--- a/control
+++ b/control
@@ -4289,7 +4289,13 @@ Section: libs
 Architecture: all
 Depends: ${java:Depends}, ${misc:Depends}
 Description: LibreOffice java test libraries
- LibreOffice subsequentchecks integration test suite
+ Java libraries LibreOffice subsequentchecks integration test suite
+
+Package: libreoffice-smoketest-data
+Section: misc
+Architecture: all
+Description: data files for LibreOffices "smoketest"
+ Data files for the LibreOffice "smoketest".
 
 Package: libreoffice-librelogo
 Section: misc
diff --git a/control.subsequentcheckbase.in b/control.subsequentcheckbase.in
deleted file mode 100644
index cb32405..0000000
--- a/control.subsequentcheckbase.in
+++ /dev/null
@@ -1,7 +0,0 @@
-Package: libreoffice-subsequentcheckbase
-Section: libs
-Architecture: all
-Depends: ${java:Depends}, ${misc:Depends}
-Description: LibreOffice java test libraries
- LibreOffice subsequentchecks integration test suite
-
diff --git a/control.test-packages.in b/control.test-packages.in
new file mode 100644
index 0000000..e696aa0
--- /dev/null
+++ b/control.test-packages.in
@@ -0,0 +1,13 @@
+Package: libreoffice-subsequentcheckbase
+Section: libs
+Architecture: all
+Depends: ${java:Depends}, ${misc:Depends}
+Description: LibreOffice java test libraries
+ Java libraries LibreOffice subsequentchecks integration test suite
+
+Package: libreoffice-smoketest-data
+Section: misc
+Architecture: all
+Description: data files for LibreOffices "smoketest"
+ Data files for the LibreOffice "smoketest".
+
diff --git a/rules b/rules
index cfd04ba..57d0edf 100755
--- a/rules
+++ b/rules
@@ -227,7 +227,7 @@ SYSTEM_STUFF += xmlsec
 # This is not exactly allowed in https://wiki.debian.org/BuildProfileSpec#Registered_profile_names
 # but it doesn't have real practical difference, does it?
 ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-  BUILD_TEST_PACKAGE=y
+  BUILD_TEST_PACKAGES=y
 endif
 
 ENABLE_SYMBOLS=y
@@ -329,7 +329,7 @@ ifeq "$(ENABLE_JAVA)" "y"
       ENABLE_JUNIT4=n
       ENABLE_CHART_TESTS=n
       ENABLE_EXPORT_VALIDATION_TESTS=n
-      BUILD_TEST_PACKAGE=n
+      BUILD_TEST_PACKAGES=n
     endif
   endif
 #  ifneq (,$(findstring arm,$(DEB_HOST_ARCH)))
@@ -358,14 +358,14 @@ else
   ENABLE_JUNIT4=n
   ENABLE_CHART_TESTS=n
   ENABLE_EXPORT_VALIDATION_TESTS=n
-  BUILD_TEST_PACKAGE=n
+  BUILD_TEST_PACKAGES=n
 endif
 else
   RUN_MAKE_CHECK=n
   ENABLE_JUNIT4=n
   ENABLE_CHART_TESTS=n
   ENABLE_EXPORT_VALIDATION_TESTS=n
-  BUILD_TEST_PACKAGE=n
+  BUILD_TEST_PACKAGES=n
 endif
 ifeq "$(ENABLE_JUNIT4)" "y"
   JUNIT_MIN_VER= (>= 4.8.2-2)
@@ -687,7 +687,7 @@ ifeq (ia64,$(findstring ia64,$(OOO_OPENJDK_ARCHS)))
   endif
 endif
 
-ifeq "$(BUILD_TEST_PACKAGE)" "n"
+ifeq "$(BUILD_TEST_PACKAGES)" "n"
 	DEBHELPER_OPTIONS += -Nlibreoffice-subsequentcheckbase
 endif
 
@@ -1845,7 +1845,7 @@ endif
 ifeq "$(ENABLE_EVO2)" "y"
 	cat debian/control.evolution.in >> debian/control
 endif
-	cat debian/control.subsequentcheckbase.in >> debian/control
+	cat debian/control.test-packages.in >> debian/control
 ifeq "$(PACKAGE_LIBRELOGO)" "y"
 	cat debian/control.librelogo.in >> debian/control
 endif
@@ -2012,7 +2012,7 @@ endif
 	./autogen.sh $(CONFIGURE_FLAGS) $(CONFIGURE_FLAGS_INDEP)
 
 	PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) build-nocheck
-ifeq "$(BUILD_TEST_PACKAGE)" "y"
+ifeq "$(BUILD_TEST_PACKAGES)" "y"
   ifeq "$(ENABLE_JUNIT4)" "y"
 	PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) Jar_{OOoRunner,test,ConnectivityTools}
   endif
@@ -2996,7 +2996,7 @@ ifeq "$(ENABLE_JAVA)" "y"
 			*) ln -s `echo $$i | sed -e 's,$(CURDIR)/$(PKGDIR)-java-common,,'` `basename $$i` ;; esac; \
 	done
 
-ifeq "$(BUILD_TEST_PACKAGE)" "y"
+ifeq "$(BUILD_TEST_PACKAGES)" "y"
   ifeq "$(ENABLE_JUNIT4)" "y"
 	rm -rf $(PKGDIR)-subsequentcheckbase
 	mkdir -p $(PKGDIR)-subsequentcheckbase/$(OODIR)/program/classes/
@@ -3004,6 +3004,14 @@ ifeq "$(BUILD_TEST_PACKAGE)" "y"
 		cp workdir/Jar/$$jar.jar $(PKGDIR)-subsequentcheckbase/$(OODIR)/program/classes/; \
 	done
   endif
+
+	rm -rf $(PKGDIR)-smoketest-data
+	mkdir -p $(PKGDIR)-smoketest-data/usr/share/libreoffice
+	cp workdir/Extension/TestExtension.oxt \
+		$(PKGDIR)-smoketest-data/usr/share/libreoffice
+#	# FIXME: Install when we get this working..
+#	cp workdir/Zip/smoketestdoc.sxw \
+#		$(PKGDIR)-smoketest-data/usr/share/libreoffice
 endif
 endif
 
@@ -3634,7 +3642,7 @@ endif
 	# and it adds a librhino-java Depends where we still use internal rhino
 	perl -pi -e "s/librhino-java//" \
 		debian/libreoffice-script-provider-js.substvars
-ifeq "$(BUILD_TEST_PACKAGE)" "y"
+ifeq "$(BUILD_TEST_PACKAGES)" "y"
 	perl -pi -e 's/junit4/junit4 $(JUNIT_MIN_VER)/' \
 		debian/libreoffice-subsequentcheckbase.substvars
 endif
diff --git a/tests/control b/tests/control
index 0fd1a51..a987ef0 100644
--- a/tests/control
+++ b/tests/control
@@ -9,6 +9,16 @@ Tests: junit-subsequentcheck
 Depends: @builddeps@, libreoffice, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb
 Restrictions: allow-stderr
 
+# 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
+Depends: libreoffice-core, libreoffice-common, libreoffice-java-common, libreoffice-smoketest, default-jdk
+
+Tests: test-extension-shared
+Depends: libreoffice-core, libreoffice-common, libreoffice-java-common, libreoffice-smoketest, default-jdk
+Restrictions: needs-root
+
 Tests: odk-build-examples
 Depends: @builddeps@, libreoffice-dev, libreoffice-dev-doc, libreoffice-java-common, python3-uno, libreoffice-officebean
 Restrictions: allow-stderr
diff --git a/tests/test-extension b/tests/test-extension
new file mode 100755
index 0000000..d9d7159
--- /dev/null
+++ b/tests/test-extension
@@ -0,0 +1,23 @@
+#!/bin/bash
+# autopkgtest check: Install a test extension (as smoketest would do)
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene at debian.org>
+
+set -e
+set -E
+
+tmpfile=`mktemp -q`
+
+# does it install fine?
+unopkg add -v /usr/share/libreoffice/TestExtension.oxt
+
+# 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 $tmpfile
+grep -q org.libreoffice.smoketest.TestExtension $tmpfile || exit 1
+rm $tmpfile
+
+# does it remove?
+unopkg remove -v org.libreoffice.smoketest.TestExtension
+
+
diff --git a/tests/test-extension-shared b/tests/test-extension-shared
new file mode 100755
index 0000000..0dc9655
--- /dev/null
+++ b/tests/test-extension-shared
@@ -0,0 +1,23 @@
+#!/bin/bash
+# autopkgtest check: Install a test extension shared
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene at debian.org>
+
+set -e
+set -E
+
+tmpfile=`mktemp -q`
+
+# does it install fine?
+unopkg add --shared -v /usr/share/libreoffice/TestExtension.oxt
+
+# 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 $tmpfile
+grep -q org.libreoffice.smoketest.TestExtension $tmpfile || exit 1
+rm $tmpfile
+
+# does it remove?
+unopkg remove --shared -v org.libreoffice.smoketest.TestExtension
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git



More information about the Pkg-openoffice-commits mailing list