tests/docker: remove FEATURES env var from templates
In preparation for switching to auto-generated dockerfiles, remove the FEATURES env variable. The equivalent functionality can be achieved in most cases by just looking for existance of a binary. The cases which don't correspond to binaries are simply dropped because configure/meson will probe for any requested feature anyway. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210623142245.307776-6-berrange@redhat.com> Message-Id: <20210709143005.1554-14-alex.bennee@linaro.org>
This commit is contained in:
parent
1ae2786c7c
commit
888673bbb9
@ -15,14 +15,23 @@
|
||||
# overriden by TARGET_LIST if the user sets it.
|
||||
DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"}
|
||||
|
||||
requires()
|
||||
requires_binary()
|
||||
{
|
||||
found=0
|
||||
for c in $@; do
|
||||
if ! echo "$FEATURES" | grep -wq -e "$c"; then
|
||||
echo "Prerequisite '$c' not present, skip"
|
||||
exit 0
|
||||
fi
|
||||
for d in /bin /usr/bin /usr/local/bin
|
||||
do
|
||||
if test -f "$d/$c"
|
||||
then
|
||||
found=1
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "$found" != "1"
|
||||
then
|
||||
echo "Prerequisite '$c' not present, skip"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
configure_qemu()
|
||||
|
@ -35,5 +35,3 @@ RUN apt update && \
|
||||
python3-sphinx \
|
||||
python3-sphinx-rtd-theme \
|
||||
$(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2)
|
||||
|
||||
ENV FEATURES docs
|
||||
|
@ -37,7 +37,6 @@ ENV PACKAGES \
|
||||
|
||||
RUN dnf install -y $PACKAGES
|
||||
RUN rpm -q $PACKAGES | sort > /packages.txt
|
||||
ENV FEATURES mingw
|
||||
|
||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-w64-mingw32-
|
||||
|
@ -33,7 +33,6 @@ ENV PACKAGES \
|
||||
|
||||
RUN dnf install -y $PACKAGES
|
||||
RUN rpm -q $PACKAGES | sort > /packages.txt
|
||||
ENV FEATURES mingw
|
||||
|
||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- --disable-capstone
|
||||
|
@ -117,4 +117,3 @@ ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
|
||||
RUN dnf install -y $PACKAGES
|
||||
RUN rpm -q $PACKAGES | sort > /packages.txt
|
||||
ENV PATH $PATH:/usr/libexec/python3-sphinx/
|
||||
ENV FEATURES mingw clang pyyaml asan docs
|
||||
|
@ -69,4 +69,3 @@ ENV PACKAGES \
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
|
||||
RUN dpkg -l $PACKAGES | sort > /packages.txt
|
||||
ENV FEATURES clang pyyaml sdl2 docs
|
||||
|
@ -55,7 +55,6 @@ ENV PACKAGES \
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
|
||||
RUN dpkg -l $PACKAGES | sort > /packages.txt
|
||||
ENV FEATURES clang pyyaml sdl2 docs
|
||||
|
||||
# https://bugs.launchpad.net/qemu/+bug/1838763
|
||||
ENV QEMU_CONFIGURE_OPTS --disable-libssh
|
||||
|
@ -70,7 +70,6 @@ ENV PACKAGES flex bison \
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
|
||||
RUN dpkg -l $PACKAGES | sort > /packages.txt
|
||||
ENV FEATURES clang tsan pyyaml sdl2
|
||||
|
||||
# Apply patch https://reviews.llvm.org/D75820
|
||||
# This is required for TSan in clang-10 to compile with QEMU.
|
||||
|
@ -30,9 +30,6 @@ mkdir -p $TEST_DIR/{src,build,install}
|
||||
|
||||
# Extract the source tarballs
|
||||
tar -C $TEST_DIR/src -xf $BASE/qemu.tar || { echo "Failed to untar source"; exit 2; }
|
||||
if test -f $TEST_DIR/src/Makefile; then
|
||||
export FEATURES="$FEATURES dtc"
|
||||
fi
|
||||
|
||||
if test -n "$SHOW_ENV"; then
|
||||
if test -f /packages.txt; then
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
. common.rc
|
||||
|
||||
requires clang
|
||||
requires_binary clang
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
. common.rc
|
||||
|
||||
requires clang asan
|
||||
requires_binary clang
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
. common.rc
|
||||
|
||||
requires mingw dtc
|
||||
requires_binary x86_64-w64-mingw32-gcc
|
||||
requires_binary i686-w64-mingw32-gcc
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
. common.rc
|
||||
|
||||
requires docs
|
||||
requires_binary sphinx-build-3 sphinx-build
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
setup_tsan()
|
||||
{
|
||||
requires clang tsan
|
||||
requires_binary clang
|
||||
tsan_log_dir="/tmp/qemu-test/build/tsan"
|
||||
mkdir -p $tsan_log_dir > /dev/null || true
|
||||
EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-tsan \
|
||||
|
Loading…
Reference in New Issue
Block a user