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>
# 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()
python3-sphinx \
python3-sphinx-rtd-theme \
$(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2)
-
-ENV FEATURES docs
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-
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
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
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
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
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.
# 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
. common.rc
-requires clang
+requires_binary clang
cd "$BUILD_DIR"
. common.rc
-requires clang asan
+requires_binary clang
cd "$BUILD_DIR"
. common.rc
-requires mingw dtc
+requires_binary x86_64-w64-mingw32-gcc
+requires_binary i686-w64-mingw32-gcc
cd "$BUILD_DIR"
. common.rc
-requires docs
+requires_binary sphinx-build-3 sphinx-build
cd "$BUILD_DIR"
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 \