aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJason Francis <zxzax@protonmail.com>2021-03-22 08:50:10 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2021-04-26 17:08:26 +0100
commit39c751b94c5e12bb7a48a64941ccf225d93359ff (patch)
tree85564bb750d0b9b99007e964ea54d6c8d18f9022 /test cases
parentbb12587e0ba83ed6cde0f395c0a31cee9a3ace26 (diff)
downloadmeson-39c751b94c5e12bb7a48a64941ccf225d93359ff.zip
meson-39c751b94c5e12bb7a48a64941ccf225d93359ff.tar.gz
meson-39c751b94c5e12bb7a48a64941ccf225d93359ff.tar.bz2
introspection: export all sources for custom targets
Also adds some test cases for source files in target_sources.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/57 introspection/meson.build11
1 files changed, 8 insertions, 3 deletions
diff --git a/test cases/unit/57 introspection/meson.build b/test cases/unit/57 introspection/meson.build
index 2b38151..2f666f3 100644
--- a/test cases/unit/57 introspection/meson.build
+++ b/test cases/unit/57 introspection/meson.build
@@ -27,13 +27,18 @@ var1 = '1'
var2 = 2.to_string()
var3 = 'test3'
-cus = custom_target('custom target test', output: 'file2', input: 'cp.py',
- command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@'])
+cus1 = custom_target('custom target test 1', output: 'file2', input: 'cp.py',
+ command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@'])
+cus2 = custom_target('custom target test 2', output: 'file3', input: cus1,
+ command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@'])
t1 = executable('test' + var1, ['t1.cpp'], link_with: [sharedlib], install: not false, build_by_default: get_option('test_opt2'))
t2 = executable('test@0@'.format('@0@'.format(var2)), sources: ['t2.cpp'], link_with: [staticlib])
t3 = executable(var3, 't3.cpp', link_with: [sharedlib, staticlib], dependencies: [dep1])
+cus3 = custom_target('custom target test 3', output: 'file4', input: t3,
+ command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@'])
+
### BEGIN: Test inspired by taisei: https://github.com/taisei-project/taisei/blob/master/meson.build#L293
systype = '@0@'.format(host_machine.system())
systype = '@0@, @1@, @2@'.format(systype, host_machine.cpu_family(), host_machine.cpu())
@@ -49,7 +54,7 @@ message(osmesa_lib_name) # Infinite recursion gets triggered here when the param
test('test case 1', t1)
test('test case 2', t2, depends: t3)
-benchmark('benchmark 1', t3, args: cus)
+benchmark('benchmark 1', t3, args: [cus1, cus2, cus3])
### Stuff to test the AST JSON printer
foreach x : ['a', 'b', 'c']