1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#!/bin/bash
set -e
pkg=simde
export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
# Double quote below to expand the temporary directory variable now versus
# later is on purpose.
# shellcheck disable=SC2064
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
SOURCE=$PWD
cd "${AUTOPKGTEST_TMP}"
cp -r /usr/include/simde ./
cp -r ${SOURCE}/test ./
cp -r ${SOURCE}/meson* ./
if [ "$(dpkg-architecture -qDEB_HOST_ARCH)" = "i386" ] ; then
# https://github.com/simd-everywhere/simde/issues/867
sed -i "/'dbsad'/d" meson.build
rm -f test/x86/avx512/dbsad.c
fi
if [ "$(dpkg-architecture -qDEB_HOST_ARCH)" = "s390x" ] ; then
# https://github.com/simd-everywhere/simde/issues/641
sed -i "/'madd'/d" meson.build
sed -i "/'qdmulh'/d" meson.build
sed -i "/'qdmulh_lane'/d" meson.build
sed -i "/'qdmulh_n'/d" meson.build
rm -f test/x86/avx512/madd.c
rm -f test/arm/neon/qdmulh.c
rm -f test/arm/neon/qdmulh_lane.c
rm -f test/arm/neon/qdmulh_n.c
fi
if [ "$(dpkg-architecture -qDEB_HOST_ARCH)" = "ppc64el" ] ; then
#https://github.com/simd-everywhere/simde/issues/986
sed -i "/'mul'/d" test/wasm/simd128/meson.build
sed -i "/'shr'/d" test/wasm/simd128/meson.build
sed -i "/'trunc_sat'/d" test/wasm/simd128/meson.build
rm -f test/wasm/simd128/mul.c
rm -f test/wasm/simd128/shr.c
rm -f test/wasm/simd128/trunc_sat.c
export CFLAGS=-O2
export CXXFLAGS=-O2
fi
mkdir build-gcc build-clang
cd build-gcc
CC=gcc CXX=g++ meson ..
meson test -v --print-errorlogs $(meson test --list | grep -v emul)
# cd ../build-clang
# CC=clang CXX=clang++ meson ..
# ninja -j$(nproc) -v test
|