whether they run on emba by checking for the environment variable
EMACS_EMBA_CI.
+* Running Emba tests locally
+
+As usual in GitLab, the tests run in containers, which could be
+applied also locally. Unfortunately, the Emba container registry,
+emba.gnu.org:5050, is not accessible publicly. Instead, the container
+images must be build locally. Change the current directory to a
+recent Emacs branch, and apply the command
+
+ docker build --target emacs-inotify --tag emacs-inotify \
+ -f test/infra/Dockerfile.emba .
+
+This creates the Debian-based image emacs-inotify, based on the
+instructions in the file Dockerfile.emba. This image is good for the
+majority of tests. However, there are also other image build
+instructions like emacs-filenotify-gio, emacs-eglot, emacs-gnustep and
+emacs-native-comp-speed{0,1,2}. Use the appropriate one.
+
+The image contains a directory "/checkout", which is a copy of your
+local Emacs git repository. Emacs has been built in this directory
+via "make bootstrap". In order to use the image, start a container
+like
+
+ docker run --interactive --env EMACS_EMBA_CI=1 --name emacs-inotify \
+ emacs-inotify /bin/sh -i
+
+In this container, change the current directory to "/checkout". Now
+you can apply all commands known for Emacs, like
+
+ cd /checkout
+ make -C test files-tests.log
+
+While this container runs, you can also access its filesystem from
+your local Emacs via Tramp. For example, in order to see the result
+of the above test run, open the log file in your local Emacs with
+
+ C-x C-f /docker:emacs-inotify:/checkout/test/lisp/files-tests.log
+
+Note: On local Red Hat-based systems, use "podman" instead of "docker"
+in the shell commands and Tramp file names.
+
\f
This file is part of GNU Emacs.
RUN ./configure --with-file-notification=gfile
RUN make bootstrap
-FROM emacs-base as emacs-eglot
+# Debian bullseye doesn't provide proper packages. So we use Debian
+# sid for this.
+FROM debian:sid as emacs-eglot
+# This corresponds to emacs-base.
RUN apt-get update && \
apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
- wget lsb-release software-properties-common gpg \
+ libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev \
+ libdbus-1-dev libacl1-dev acl git texinfo gdb \
&& rm -rf /var/lib/apt/lists/*
-# A recent clangd. It must be at least clangd 14, which is in Debian
-# bookworm.
-RUN bash -c "$(wget --no-check-certificate -O - https://apt.llvm.org/llvm.sh)"
-RUN ln -s /usr/bin/clangd-15 /usr/bin/clangd
+# Some language servers.
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
+ clangd python3-pylsp python3-autopep8 python3-yapf \
+ && rm -rf /var/lib/apt/lists/*
COPY . /checkout
WORKDIR /checkout