diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-07-18 08:08:17 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-07-21 09:03:50 -0700 |
| commit | 6812f3f54a8e59db8c2515fda9535a668ed211a1 (patch) | |
| tree | cdd647001872c223ff200d3922a828fcbca36d7a /test | |
| parent | ad2a795b9d88852f74866092738fb05badf9d9f2 (diff) | |
test: switch to Ubuntu for now
We can't use Alpine because we can't yet compile for musl.
Diffstat (limited to 'test')
| -rw-r--r-- | test/Dockerfile | 73 | ||||
| -rw-r--r-- | test/cases/vttest/1_1.sh.ghostty.png | bin | 0 -> 42527 bytes | |||
| -rw-r--r-- | test/cases/vttest/launch.sh.alacritty.png | bin | 0 -> 17719 bytes | |||
| -rwxr-xr-x | test/run.sh | 6 |
4 files changed, 44 insertions, 35 deletions
diff --git a/test/Dockerfile b/test/Dockerfile index 066fbc819..d35b74fa3 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -1,45 +1,48 @@ #-------------------------------------------------------------------- -# vttest +# Alacritty since it has no build in Ubuntu #-------------------------------------------------------------------- -FROM alpine:3.16 AS vttest +FROM rust AS alacritty -RUN apk add --no-cache build-base curl +RUN apt-get update && apt-get install -y \ + cmake pkg-config libfreetype6-dev libfontconfig1-dev \ + libxcb-xfixes0-dev python3 git -RUN curl -o vttest.tar.gz https://invisible-island.net/archives/vttest/vttest-20220215.tgz && \ - tar xvzf vttest.tar.gz && \ - cd vttest-20220215 && \ - ./configure && \ - make && \ - cp ./vttest / +RUN git clone https://github.com/alacritty/alacritty.git /tmp/alacritty + +WORKDIR /tmp/alacritty + +RUN git checkout tags/$(git describe --tags $(git rev-list --tags --max-count=1)) + +RUN RUSTFLAGS='-C link-arg=-s' cargo build --release #-------------------------------------------------------------------- -# main runner +# Main Runner #-------------------------------------------------------------------- -FROM alpine:3.16 - -# Base packages. A good set of this is just to get X (xvfb) and OpenGL -# software rendering working (all the mesa drivers). -RUN apk add --no-cache \ - bash \ - grep \ - procps \ - font-inconsolata-nerd \ - i3wm \ - imagemagick \ - libxrandr \ - mesa-dev \ - mesa-dri-gallium \ - mesa-gl \ - xvfb \ - xvfb-run \ - xdotool - -# Our terminals -RUN apk add --no-cache \ - alacritty \ - xterm - -COPY --from=vttest /vttest /usr/bin/vttest +# Note: we used to use Alpine, but we need to use an OS that is more +# glibc friendly because on Linux we still require glibc (active todo to +# support musl). +FROM ubuntu:22.04 + +# Base deps +RUN apt-get update && apt-get install -y \ + fonts-inconsolata \ + i3 \ + imagemagick \ + libgl1-mesa-dev \ + libxcursor1 \ + patchelf \ + software-properties-common \ + xdotool \ + xvfb \ + vttest + +# Terminals +RUN apt-get install -y \ + xterm + +RUN rm -rf /var/lib/apt/lists/* + +COPY --from=alacritty /tmp/alacritty/target/release/alacritty /usr/bin/alacritty COPY ./run.sh /entrypoint.sh diff --git a/test/cases/vttest/1_1.sh.ghostty.png b/test/cases/vttest/1_1.sh.ghostty.png Binary files differnew file mode 100644 index 000000000..6a24c4aed --- /dev/null +++ b/test/cases/vttest/1_1.sh.ghostty.png diff --git a/test/cases/vttest/launch.sh.alacritty.png b/test/cases/vttest/launch.sh.alacritty.png Binary files differnew file mode 100644 index 000000000..740f8faf8 --- /dev/null +++ b/test/cases/vttest/launch.sh.alacritty.png diff --git a/test/run.sh b/test/run.sh index 781ccb029..09d7249a2 100755 --- a/test/run.sh +++ b/test/run.sh @@ -55,8 +55,14 @@ fi echo "Term: ${ARG_EXEC}" echo "Case: ${ARG_CASE}" +# NOTE: This is a huge hack right now. if [ "$ARG_EXEC" = "ghostty" ]; then ARG_EXEC="/src/ghostty"; + + # We build in Nix (maybe). To be sure, we replace the interpreter so + # it doesn't point to a Nix path. If we don't build in Nix, this should + # still be safe. + patchelf --set-interpreter /lib/ld-linux-$(uname -m).so.1 ${ARG_EXEC} fi #-------------------------------------------------------------------- |
