devtools: allow warnings in ABI reference build
[dpdk.git] / devtools / test-meson-builds.sh
index c2d33b3..18b874f 100755 (executable)
@@ -74,7 +74,11 @@ config () # <dir> <builddir> <meson options>
                return
        fi
        options=
-       options="$options --werror -Dexamples=all"
+       if echo $* | grep -qw -- '--default-library=shared' ; then
+               options="$options -Dexamples=all"
+       else
+               options="$options -Dexamples=l3fwd" # save disk space
+       fi
        options="$options --buildtype=debugoptimized"
        for option in $DPDK_MESON_OPTIONS ; do
                options="$options -D$option"
@@ -104,8 +108,13 @@ compile () # <builddir>
 install_target () # <builddir> <installdir>
 {
        rm -rf $2
-       echo "DESTDIR=$2 $ninja_cmd -C $1 install"
-       DESTDIR=$2 $ninja_cmd -C $1 install
+       if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE$TEST_MESON_BUILD_VERBOSE" ]; then
+               echo "DESTDIR=$2 $ninja_cmd -C $1 install"
+               DESTDIR=$2 $ninja_cmd -C $1 install
+       else
+               echo "DESTDIR=$2 $ninja_cmd -C $1 install >/dev/null"
+               DESTDIR=$2 $ninja_cmd -C $1 install >/dev/null
+       fi
 }
 
 build () # <directory> <target compiler> <meson options>
@@ -117,7 +126,7 @@ build () # <directory> <target compiler> <meson options>
        # skip build if compiler not available
        command -v ${CC##* } >/dev/null 2>&1 || return 0
        load_env $targetcc || return 0
-       config $srcdir $builds_dir/$targetdir $*
+       config $srcdir $builds_dir/$targetdir --werror $*
        compile $builds_dir/$targetdir
        if [ -n "$DPDK_ABI_REF_VERSION" ]; then
                abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION