Commit f9561e8d authored by Conny Seidel's avatar Conny Seidel Committed by Avi Kivity
Browse files

Disable API tests if dependencies are not met



Add runtime detection of 32bit libraries to prevent build fails.
Signed-off-by: default avatarConny Seidel <conny.seidel@amd.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 951181c8
......@@ -36,8 +36,10 @@ tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
$(TEST_DIR)/kvmclock_test.flat $(TEST_DIR)/eventinj.flat \
$(TEST_DIR)/s3.flat
ifdef API
tests-common += api/api-sample
tests-common += api/dirty-log
endif
tests_and_config = $(TEST_DIR)/*.flat $(TEST_DIR)/unittests.cfg
......
......@@ -63,6 +63,22 @@ while [[ "$1" = -* ]]; do
esac
done
# check for dependent 32 bit libraries
cat << EOF > lib_test.c
#include <stdc++.h>
#include <boost_thread-mt.h>
#include <pthread.h>
int main ()
{}
EOF
$cc -m32 -o /dev/null lib_test.c &> /dev/null
exit=$?
if [ $exit -eq 0 ]; then
api=true
fi
rm -f lib_test.c
cat <<EOF > config.mak
PREFIX=$prefix
KERNELDIR=$(readlink -f $kerneldir)
......@@ -72,4 +88,5 @@ CC=$cross_prefix$cc
LD=$cross_prefix$ld
OBJCOPY=$cross_prefix$objcopy
AR=$cross_prefix$ar
API=$api
EOF
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment