Add a wrapper to uname to do tests on fake 32 bits versions

This commit is contained in:
Adrien Ferrand 2019-12-05 22:11:29 +01:00
parent f85dd45ff0
commit a97697d86d
2 changed files with 14 additions and 0 deletions

View file

@ -30,6 +30,11 @@ RUN update-ca-trust
# Copy code:
COPY . /home/lea/certbot/letsencrypt-auto-source
# Tweak uname binary for tests on fake 32bits
COPY uname_wrapper /bin
RUN mv /bin/uname /bin/uname_orig \
&& mv /bin/uname_wrapper /bin/uname
USER lea
WORKDIR /home/lea

View file

@ -0,0 +1,9 @@
#!/bin/bash
uname_output=$(/bin/uname_orig "$@")
if [ "$UNAME_FAKE_32BITS" = true ]; then
uname_output="${uname_output/x86_64/i686}"
fi
echo "$uname_output"