improve the update-binfmts test

This commit is contained in:
Sylvestre Ledru 2020-07-08 16:26:53 +02:00
parent 12445b77c1
commit 16a9075307

View File

@ -294,7 +294,8 @@ fi
clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc
chmod +x foo.bc
# only run if the binfmt is installed correctly
if /usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> /dev/null; then
/usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> foo.log || true
if grep -q "interpreter = /usr/bin/lli-" foo.log; then
if ! ./foo.bc|grep -q "lli foo"; then
echo "executing ./foo.bc failed"
./foo.bc