A 'test_args.txt' file in the same directory as the test case will be parsed by the test framework and the content will be passed as arguments to meson during configuration. The arguments are put before any 'extra_args' to make them overwritable from the command line.pull/433/head
parent
118e043143
commit
5482a23936
4 changed files with 29 additions and 1 deletions
@ -0,0 +1,5 @@ |
||||
project('options', 'c') |
||||
|
||||
assert(get_option('testoption') == 'A string with spaces', 'Incorrect value for testoption option.') |
||||
assert(get_option('other_one') == true, 'Incorrect value for other_one option.') |
||||
assert(get_option('combo_opt') == 'one', 'Incorrect value for combo_opt option.') |
@ -0,0 +1,3 @@ |
||||
option('testoption', type : 'string', value : 'optval', description : 'An option to do something') |
||||
option('other_one', type : 'boolean', value : false) |
||||
option('combo_opt', type : 'combo', choices : ['one', 'two', 'combo'], value : 'combo') |
@ -0,0 +1,4 @@ |
||||
# This file is not read by meson itself, but by the test framework. |
||||
# It is not possible to pass arguments to meson from a file. |
||||
['--werror', '-D', 'testoption=A string with spaces', '-D', 'other_one=true', \ |
||||
'-D', 'combo_opt=one'] |
Loading…
Reference in new issue