From 19d36654e2dc66dc415cbf2dcfe5780dbf94c8d2 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 11 Nov 2024 08:42:51 -0500 Subject: [PATCH] external-project: Test env kwarg --- test cases/common/230 external project/libfoo/configure | 7 +++++++ test cases/common/230 external project/libfoo/meson.build | 1 + 2 files changed, 8 insertions(+) diff --git a/test cases/common/230 external project/libfoo/configure b/test cases/common/230 external project/libfoo/configure index 0e4aa72b22b9..768a98ebd09e 100755 --- a/test cases/common/230 external project/libfoo/configure +++ b/test cases/common/230 external project/libfoo/configure @@ -1,5 +1,7 @@ #! /bin/sh +set -e + srcdir=$(dirname "$0") for i in "$@" @@ -42,3 +44,8 @@ install: libfoo.$LIBEXT cp \$< "\$(DESTDIR)$LIBDIR"; cp "$srcdir/libfoo.h" "\$(DESTDIR)$INCDIR"; EOL + +if [ "$FOO" != "BAR" ]; then + echo "Env FOO is not set" + exit 1 +fi diff --git a/test cases/common/230 external project/libfoo/meson.build b/test cases/common/230 external project/libfoo/meson.build index a2512aa6fddb..f392966b1693 100644 --- a/test cases/common/230 external project/libfoo/meson.build +++ b/test cases/common/230 external project/libfoo/meson.build @@ -17,6 +17,7 @@ p = mod.add_project('configure', '--libext=' + libext, ], depends: somelib, + env: ['FOO=BAR'], ) libfoo_dep = declare_dependency(link_with : somelib,