[gjs/iwyu-job: 3/8] CI: Only setup the builddir in run_iwyu
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/iwyu-job: 3/8] CI: Only setup the builddir in run_iwyu
- Date: Wed, 3 Jun 2020 22:50:04 +0000 (UTC)
commit a7501717ae5557d175030db92017be85c720cb78
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Jun 2 21:43:29 2020 -0700
CI: Only setup the builddir in run_iwyu
There's no need to build the whole project, as we are only analyzing the
source code. We just need to run 'meson setup' on the builddir so that
we have the compilation database.
Also print the list of affected files after running Meson so they don't
scroll out of sight.
tools/run_iwyu.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tools/run_iwyu.sh b/tools/run_iwyu.sh
index e67f4818..3d8cba24 100755
--- a/tools/run_iwyu.sh
+++ b/tools/run_iwyu.sh
@@ -17,8 +17,6 @@ else
files="$(git diff-tree --name-only -r $1..) $(git diff-index --name-only HEAD)"
fi
-echo "files: $files"
-
should_analyze () {
file=$(realpath --relative-to=$SRCDIR $1)
case "$files" in
@@ -31,11 +29,13 @@ should_analyze () {
esac
}
-cd ${BUILDDIR:-_build}
-if ! ninja; then
- echo 'Build failed.'
+if ! meson setup _build; then
+ echo 'Meson failed.'
exit 1
fi
+cd ${BUILDDIR:-_build}
+
+echo "files: $files"
IWYU="iwyu_tool -p ."
PRIVATE_MAPPING="-Xiwyu --mapping_file=$SRCDIR/tools/gjs-private-iwyu.imp -Xiwyu --keep=config.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]