Compare commits
3
Commits
91cc1ff62f
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03b19ccd1d | ||
|
|
5f598b22af | ||
|
|
d31b44b2a5 |
@@ -5,13 +5,26 @@ FROM $BASE_BUILDER
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
git \
|
||||
libwayland-dev \
|
||||
libxkbcommon-dev \
|
||||
lsb-release \
|
||||
pkg-config \
|
||||
software-properties-common \
|
||||
wayland-protocols \
|
||||
weston \
|
||||
xvfb
|
||||
|
||||
ENV PATH="/root/.local/bin:${PATH}"
|
||||
|
||||
# Headless Wayland test setup: a pre-created, correctly-permissioned XDG_RUNTIME_DIR (required
|
||||
# by Wayland clients/compositors) plus a weston-run wrapper mirroring xvfb-run's ergonomics -
|
||||
# starts Weston's headless backend, runs the given command against it, then tears it down.
|
||||
RUN mkdir -p -m 700 /tmp/xdg-runtime
|
||||
ENV XDG_RUNTIME_DIR=/tmp/xdg-runtime
|
||||
|
||||
COPY weston-run /usr/local/bin/weston-run
|
||||
RUN chmod +x /usr/local/bin/weston-run
|
||||
|
||||
# Install LLVM 22 and symlink tools
|
||||
RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh \
|
||||
&& chmod +x /tmp/llvm.sh \
|
||||
@@ -22,7 +35,7 @@ RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh \
|
||||
&& rm -f /tmp/llvm.sh*
|
||||
|
||||
# Install Infer
|
||||
RUN VERSION=1.2.0; \
|
||||
RUN VERSION=1.3.0; \
|
||||
curl -sSL "https://github.com/facebook/infer/releases/download/v$VERSION/infer-linux-x86_64-v$VERSION.tar.xz" \
|
||||
| tar -C /opt -xJ && \
|
||||
ln -s "/opt/infer-linux-x86_64-v$VERSION/bin/infer" /usr/bin/infer
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Runs the given command against a headless Weston compositor, mirroring xvfb-run's ergonomics
|
||||
# for Wayland. Usage: weston-run <command> [args...]
|
||||
weston --backend=headless-backend.so --shell=kiosk-shell.so --socket=wayland-headless &
|
||||
WESTON_PID=$!
|
||||
sleep 1
|
||||
WAYLAND_DISPLAY=wayland-headless "$@"
|
||||
STATUS=$?
|
||||
kill "$WESTON_PID" 2>/dev/null
|
||||
wait "$WESTON_PID" 2>/dev/null
|
||||
exit "$STATUS"
|
||||
Reference in New Issue
Block a user