[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pdf-tools 7a51b38310 13/16: Extend docker testing framewor
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pdf-tools 7a51b38310 13/16: Extend docker testing framework to test against Emacs versions |
Date: |
Tue, 29 Nov 2022 01:59:32 -0500 (EST) |
branch: elpa/pdf-tools
commit 7a51b38310014628fe4ada9731d6d63657e8f209
Author: Vedang Manerikar <ved.manerikar@gmail.com>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>
Extend docker testing framework to test against Emacs versions
Until this commit, docker-based local testing only checked whether the
epdfinfo server compiled correctly. With this commit, local testing
now also runs elisp tests against the different versions of Emacs we
currently support.
All versions of Emacs are run on Ubuntu at the moment,
but going forward I expect that we will add more operating system
variants to this matrix as well.
As test coverage increases, this will help automate away a lot of the
tests!
Relates to: #130
---
server/test/.gitignore | 1 +
server/test/Makefile | 6 ++++--
server/test/docker/lib/run-tests | 21 ++++++++++++++++++---
server/test/docker/templates/Dockerfile.common.in | 6 +++---
server/test/docker/templates/emacs-26.Dockerfile.in | 5 +++++
server/test/docker/templates/emacs-27.Dockerfile.in | 5 +++++
server/test/docker/templates/emacs-28.Dockerfile.in | 5 +++++
server/test/docker/templates/emacs-29.Dockerfile.in | 5 +++++
8 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/server/test/.gitignore b/server/test/.gitignore
new file mode 100644
index 0000000000..aaedb1f2fc
--- /dev/null
+++ b/server/test/.gitignore
@@ -0,0 +1 @@
+.start-vm
diff --git a/server/test/Makefile b/server/test/Makefile
index 303b9a1204..26a0f36af2 100644
--- a/server/test/Makefile
+++ b/server/test/Makefile
@@ -39,10 +39,10 @@ docker/%.Dockerfile: docker/templates/%.Dockerfile.in \
@echo Creating Dockerfile for target $*
cat $^ > $@
-# Build the Docker Image
+# Build the Docker Image. Since we are building a new image, remove the
existing container.
docker/.%.build: docker/%.Dockerfile ../autobuild docker/lib
@echo Building target image $*
- podman image build $(DOCKER_BUILD_ARGS) epdfinfo/$* -f $< ../
+ podman image build $(DOCKER_BUILD_ARGS) epdfinfo/$* -f $< ../../
touch $@
# Build the Docker Container
@@ -68,6 +68,8 @@ docker/.%.clean:
docker/clean: $(patsubst %, docker/.%.clean, $(DOCKER_OS))
+test: docker/test
+
clean: docker/clean
rm -f -- docker/.[^.]*.build
rm -f -- docker/.[^.]*.container
diff --git a/server/test/docker/lib/run-tests b/server/test/docker/lib/run-tests
index 43fe5e5cd2..31887bf23f 100755
--- a/server/test/docker/lib/run-tests
+++ b/server/test/docker/lib/run-tests
@@ -2,8 +2,23 @@
PATH="$(dirname "$0")":$PATH
-set -e
+run_tests_exit_success()
+{
+ echo "==============================="
+ echo " Elisp Tests succeeded. :O) "
+ echo "==============================="
+ exit 0
+}
-yes-or-enter | ./autobuild -i /bin
-yes-or-enter | ./autobuild -i /usr/bin | \
+set -e
+# Check that install completes successfully
+yes-or-enter | ./server/autobuild -i /bin
+# Check that re-install skips package installation
+yes-or-enter | ./server/autobuild -i /usr/bin | \
grep -q "Skipping package installation (already installed)"
+# Check that lisp tests run correctly, if emacs is installed and available on
PATH
+echo
+if which emacs > /dev/null 2> /dev/null; then
+ echo "Emacs found installed! Running elisp tests"
+ make test && run_tests_exit_success
+fi
diff --git a/server/test/docker/templates/Dockerfile.common.in
b/server/test/docker/templates/Dockerfile.common.in
index 083b19a576..142f0620c2 100644
--- a/server/test/docker/templates/Dockerfile.common.in
+++ b/server/test/docker/templates/Dockerfile.common.in
@@ -1,4 +1,4 @@
-ADD . /epdfinfo
-WORKDIR /epdfinfo
+COPY . /pdf-tools
+WORKDIR /pdf-tools
RUN make -s distclean || true
-CMD ["sh", "./test/docker/lib/run-tests"]
+CMD ["sh", "./server/test/docker/lib/run-tests"]
diff --git a/server/test/docker/templates/emacs-26.Dockerfile.in
b/server/test/docker/templates/emacs-26.Dockerfile.in
new file mode 100644
index 0000000000..088a991f56
--- /dev/null
+++ b/server/test/docker/templates/emacs-26.Dockerfile.in
@@ -0,0 +1,5 @@
+# -*- dockerfile -*-
+FROM silex/emacs:26-ci-cask
+ARG DEBIAN_FRONTEND=noninteractive
+# Need to install make, tzdata here to avoid stupid prompts when running
package install via autobuild
+RUN apt-get update -y && apt-get install -y make tzdata
diff --git a/server/test/docker/templates/emacs-27.Dockerfile.in
b/server/test/docker/templates/emacs-27.Dockerfile.in
new file mode 100644
index 0000000000..50cd8209be
--- /dev/null
+++ b/server/test/docker/templates/emacs-27.Dockerfile.in
@@ -0,0 +1,5 @@
+# -*- dockerfile -*-
+FROM silex/emacs:27-ci-cask
+ARG DEBIAN_FRONTEND=noninteractive
+# Need to install make, tzdata here to avoid stupid prompts when running
package install via autobuild
+RUN apt-get update -y && apt-get install -y make tzdata
diff --git a/server/test/docker/templates/emacs-28.Dockerfile.in
b/server/test/docker/templates/emacs-28.Dockerfile.in
new file mode 100644
index 0000000000..c6895ac295
--- /dev/null
+++ b/server/test/docker/templates/emacs-28.Dockerfile.in
@@ -0,0 +1,5 @@
+# -*- dockerfile -*-
+FROM silex/emacs:28-ci-cask
+ARG DEBIAN_FRONTEND=noninteractive
+# Need to install make, tzdata here to avoid stupid prompts when running
package install via autobuild
+RUN apt-get update -y && apt-get install -y make tzdata
diff --git a/server/test/docker/templates/emacs-29.Dockerfile.in
b/server/test/docker/templates/emacs-29.Dockerfile.in
new file mode 100644
index 0000000000..edbf7647c8
--- /dev/null
+++ b/server/test/docker/templates/emacs-29.Dockerfile.in
@@ -0,0 +1,5 @@
+# -*- dockerfile -*-
+FROM silex/emacs:master-ci-cask
+ARG DEBIAN_FRONTEND=noninteractive
+# Need to install make, tzdata here to avoid stupid prompts when running
package install via autobuild
+RUN apt-get update -y && apt-get install -y make tzdata
- [nongnu] elpa/pdf-tools 710fe66dc4 02/16: Explicitly declare documentation files as Org files, (continued)
- [nongnu] elpa/pdf-tools 710fe66dc4 02/16: Explicitly declare documentation files as Org files, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 997467ad3b 15/16: autobuild: Recognize NetBSD and install packages via pkgin, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 5563ac9114 04/16: Remove bugfix for imenu in Emacs 24.3 and below, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 1f91ba8894 09/16: Render crisp images for HiDPI screens by default, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 365d2d8e8e 03/16: Remove guards in `pdf-virtual` tests and code., ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 19801defb8 10/16: Add support for Alpine Linux to autobuild, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 1885cefc24 16/16: Merge branch 'feature/emacs-26.3', ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 96703b2bb5 14/16: Bump the minimum Emacs version to 26.3! 🎉🤞, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools ce5ed3412d 05/16: Remove macro / function re-definitions, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 05c42596a2 07/16: Remove compatibility function for image-mode-winprops, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 7a51b38310 13/16: Extend docker testing framework to test against Emacs versions,
ELPA Syncer <=
- [nongnu] elpa/pdf-tools bc7c159c48 11/16: Make sure pkg-config is correctly set in autobuild, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 3af6141926 06/16: Remove pdf-util-window-pixel-width, fallback to window-body-width, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 321e19ed59 08/16: Remove Emacs 24.4 guards for cua-mode, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools e10d9cedad 12/16: Update and cleanup the Install section, ELPA Syncer, 2022/11/29