From 02a045ac457348ce6e6882dbe799c8f0c46842a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 2 Apr 2016 03:42:47 +0200 Subject: [PATCH] geckolib: Check bindgen status and run tests automatically --- ports/geckolib/tools/regen_style_structs.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/geckolib/tools/regen_style_structs.sh b/ports/geckolib/tools/regen_style_structs.sh index 069e150767c..8470a305c79 100755 --- a/ports/geckolib/tools/regen_style_structs.sh +++ b/ports/geckolib/tools/regen_style_structs.sh @@ -128,3 +128,13 @@ fi -opaque-type "imgIRequest" \ -include "$1/mozilla-config.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