aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-10-14 18:17:25 +0200
committerDylan Baker <dylan@pnwbakers.com>2021-12-06 13:27:12 -0800
commit2ef06618e2252fc5fb9262792a3bd544ec182ec5 (patch)
tree40979088dce8bec0dafa02412a96b893de60eb32 /test cases
parent185c4e3c95f32de429179b025ef86785b06bc3de (diff)
downloadmeson-2ef06618e2252fc5fb9262792a3bd544ec182ec5.zip
meson-2ef06618e2252fc5fb9262792a3bd544ec182ec5.tar.gz
meson-2ef06618e2252fc5fb9262792a3bd544ec182ec5.tar.bz2
pass all outputs of a custom_target as arguments to a test
Meson was passing only the first output and warning about it. To do this easily, refactor construct_target_rel_path to return a list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/245 custom target index source/main.c4
-rw-r--r--test cases/common/245 custom target index source/meson.build5
2 files changed, 6 insertions, 3 deletions
diff --git a/test cases/common/245 custom target index source/main.c b/test cases/common/245 custom target index source/main.c
index c1c2b09..48af141 100644
--- a/test cases/common/245 custom target index source/main.c
+++ b/test cases/common/245 custom target index source/main.c
@@ -1,6 +1,8 @@
+#include <assert.h>
#include "gen.h"
-int main(void)
+int main(int argc)
{
+ assert(argc == 3);
return genfunc();
}
diff --git a/test cases/common/245 custom target index source/meson.build b/test cases/common/245 custom target index source/meson.build
index 4dc54d4..c7efbd8 100644
--- a/test cases/common/245 custom target index source/meson.build
+++ b/test cases/common/245 custom target index source/meson.build
@@ -46,5 +46,6 @@ exe_together = executable('exe_together',
install: false,
)
-test('exe_separate', exe_separate)
-test('exe_together', exe_together)
+# also cover passing custom target to tests as arguments
+test('exe_separate', exe_separate, args: ['unused1', 'unused2'])
+test('exe_together', exe_together, args: gen)