@@ -2,7 +2,7 @@ FROM ubuntu:24.04
22
33ENV DEBIAN_FRONTEND=noninteractive
44
5- # Core tools
5+ # Core tools + build deps for bash 3.2
66RUN apt-get update && apt-get install -y \
77 tmux \
88 jq \
@@ -13,8 +13,24 @@ RUN apt-get update && apt-get install -y \
1313 nodejs \
1414 npm \
1515 python3 \
16+ gcc \
17+ make \
1618 && rm -rf /var/lib/apt/lists/*
1719
20+ # Install bash 3.2 from source (macOS ships bash 3.2; needed for awk-fallback tests)
21+ # SHA256 pinned for reproducibility (GPG sig also at bash-3.2.tar.gz.sig on ftp.gnu.org).
22+ RUN BASH32_SHA256="26c99025b59e30779300b68adb764f824974d267a4d7cc1b347d14a2393f9fb4" && \
23+ curl -sSfL -o /tmp/bash-3.2.tar.gz https://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz \
24+ && echo "$BASH32_SHA256 /tmp/bash-3.2.tar.gz" | sha256sum -c - \
25+ && tar xz -C /tmp -f /tmp/bash-3.2.tar.gz \
26+ && ARCH=$(uname -m) \
27+ && case "$ARCH" in x86_64) TRIPLE="x86_64-pc-linux-gnu" ;; aarch64) TRIPLE="aarch64-unknown-linux-gnu" ;; *) TRIPLE="$ARCH-pc-linux-gnu" ;; esac \
28+ && cd /tmp/bash-3.2 \
29+ && ./configure --build="$TRIPLE" --prefix=/usr/local --without-bash-malloc >/dev/null 2>&1 \
30+ && make -j"$(nproc)" >/dev/null 2>&1 \
31+ && cp bash /usr/local/bin/bash3.2 \
32+ && rm -rf /tmp/bash-3.2 /tmp/bash-3.2.tar.gz
33+
1834# Install just
1935RUN curl -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
2036
@@ -34,4 +50,8 @@ WORKDIR /home/testuser
3450# Copy the repo in (done as testuser for correct ownership)
3551COPY --chown=testuser:testuser . /home/testuser/tmux-assistant-resurrect
3652
37- ENTRYPOINT ["bash" , "/home/testuser/tmux-assistant-resurrect/test/run-tests.sh" ]
53+ # TEST_BASH: override bash used by scripts under test (save/restore).
54+ # "bash" (default) = system bash 5; "bash3.2" = bash 3.2 awk-fallback path.
55+ # The test harness itself always runs under bash 5 (explicit in ENTRYPOINT).
56+ ENV TEST_BASH="bash"
57+ ENTRYPOINT ["/bin/bash" , "/home/testuser/tmux-assistant-resurrect/test/run-tests.sh" ]
0 commit comments