geckolib: Check bindgen status and run tests automatically

This commit is contained in:
Emilio Cobos Álvarez 2016-04-02 03:42:47 +02:00
parent b50f760d86
commit 02a045ac45

View file

@ -128,3 +128,13 @@ fi
-opaque-type "imgIRequest" \ -opaque-type "imgIRequest" \
-include "$1/mozilla-config.h" \ -include "$1/mozilla-config.h" \
"$DIST_INCLUDE/nsStyleStruct.h" "$DIST_INCLUDE/nsStyleStruct.h"
if [ $? -ne 0 ]; then
echo -e "\e[91warning:\e[0m bindgen exited with nonzero exit status"
else
echo -e "\e[34minfo:\e[0m bindgen exited successfully, running tests"
TESTS_FILE=$(mktemp)
rustc ../gecko_style_structs.rs --test -o $TESTS_FILE
$TESTS_FILE
rm $TESTS_FILE
fi