test-meson-build: fix check for whether meson has run
PATCH 1/1 test-meson-build: fix check for whether meson has run
The current check to see whether we need to call meson or just ninja simply checked if the build directory existed. However, if meson was run but failed, the build directory would still exist. We can fix this by instead checking for the build.ninja file inside the directory. Once that is present, we can use ninja safely and let it worry about rerunning meson if necessary.
--- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
devtools/test-meson-builds.sh +1 -1
@@ -24,7 +24,7 @@ build () # <directory> <meson options> { builddir=$1 shift - if [ ! -d "$builddir" ] ; then + if [ ! -f "$builddir/build.ninja" ] ; then options="--werror -Dexamples=all $*" echo "$MESON $options $srcdir $builddir" $MESON $options $srcdir $builddir
Signature · 1 line
2.20.1
Quoted 28 lines · Bruce Richardson
The current check to see whether we need to call meson or just ninja simply checked if the build directory existed. However, if meson was run
but failed, the build directory would still exist. We can fix this by instead checking for the build.ninja file inside the directory. Once that
is present, we can use ninja safely and let it worry about rerunning meson if necessary.Fixes a55277a788df ("devtools: add test script for meson builds")Signed-off-by Bruce Richardson <[email protected]>---
devtools/test-meson-builds.sh | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)devtools/test-meson- renamed from devtools/test-meson-builds.sh +0
-0
builds.sh
index79109b757..3edc805f6100755devtools/test-meson-builds.sh +0
-0@@ -24,7 +24,7 @@ build () # <directory> <meson options> {builddir=$1
shiftdevtools/test-meson-builds.sh +1
-1- if [ ! -d "$builddir" ] ; then + if [ ! -f "$builddir/build.ninja" ] ; then
Quoted 3 lines
options="--werror -Dexamples=all $*" echo "$MESON $options $srcdir $builddir" $MESON $options $srcdir $builddir
Signature · 2 lines
Kind regards, Luca Boccassi
Thomas Monjalon
Applied10/01/2019 14:10, Luca Boccassi:
Quoted 10 lines · Bruce Richardson
Quoted 9 lines
The current check to see whether we need to call meson or just ninja simply checked if the build directory existed. However, if meson was run
but failed, the build directory would still exist. We can fix this by instead checking for the build.ninja file inside the directory. Once that
is present, we can use ninja safely and let it worry about rerunning meson if necessary.
Quoted 6 lines
Quoted 4 lines
Fixes a55277a788df ("devtools: add test script for meson builds")Signed-off-by Bruce Richardson <[email protected]>Acked-by Luca Boccassi <[email protected]>
Applied, thanks