Commit aa8820f0 authored by Sam Thursfield's avatar Sam Thursfield

Tighten /etc mount used when testing

We only need /etc/passwd, not the whole thing.
parent d9c46d24
......@@ -33,7 +33,6 @@ build_and_test:
bst shell tagcloud-test-environment.bst --mount $CI_PROJECT_DIR /src \
-- sh -c 'cd /src; mkdir build; meson ./build --prefix=/app'
bst shell tagcloud-test-environment.bst --mount $CI_PROJECT_DIR /src \
--mount /etc/ /etc \
-- sh -c 'cd /src/build; meson test --verbose'
# Install the Flathub remote and pull the necessary runtime.
......
......@@ -38,12 +38,10 @@ correct configuration, as in the following example:
bst shell tagcloud-test-environment.bst --mount ~/tagcloud /src \
-- sh -c 'cd /src; mkdir build; meson ./build --prefix=/app'
Once this is done, you can run the test suite as follows. Note that we
need to make `/etc` from the host available, mainly because we have a D-Bus
daemon running inside the sandbox and it requires some files from /etc.
Once this is done, you can run the test suite as follows.
bst shell tagcloud-test-environment.bst --mount ~/tagcloud /src --mount /etc /etc \
-- sh -c 'cd /src/build; meson test --verbose'
bst shell tagcloud-test-environment.bst --mount ~/tagcloud /src \
-- sh -c 'cd /src/build; xvfb-run dbus-launch meson test --print-errorlogs'
You can also use the test environment to run the Tagcloud application. This is
NOT the same as running it under Flatpak and is not a substitute for real
......
......@@ -59,3 +59,12 @@ shell:
DISPLAY: $DISPLAY
LANG: en_US.UTF8
LC_ALL: en_US.UTF8
host-files:
# Needed for dbus-daemon to operate inside the sandbox. (Note that
# trackerappdomain actually has to start a private DBus daemon, it
# can't just use the one from the host).
- host_path: '/etc/machine-id'
path: '/etc/machine-id'
- host_path: '/etc/passwd'
path: '/etc/passwd'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment