summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2020-05-15 23:28:30 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2020-05-20 22:41:26 -0700
commit55e1342e737e6878b8822173ad4b42514ee3d1ec (patch)
tree1900cfdc4a7b201e6dada4923d1b4a4603e0cea4 /tools
parentc5f24a7cf4a2f2d23d519d2651aa68488f6899e1 (diff)
downloadgjs-55e1342e737e6878b8822173ad4b42514ee3d1ec.tar.gz
build: Don't run IWYU if build fails
We don't want to bother with the whole static analysis if there is a build error that needs to be fixed first.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_iwyu.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/run_iwyu.sh b/tools/run_iwyu.sh
index ff3b9996..f4bca812 100755
--- a/tools/run_iwyu.sh
+++ b/tools/run_iwyu.sh
@@ -3,7 +3,10 @@
SRCDIR=$(pwd)
cd ${BUILDDIR:-_build}
-ninja
+if ! ninja; then
+ echo 'Build failed.'
+ exit 1
+fi
IWYU="iwyu_tool -p ."
PRIVATE_MAPPING="-Xiwyu --mapping_file=$SRCDIR/tools/gjs-private-iwyu.imp -Xiwyu --keep=config.h"