Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add suites: to add_test_setup() #10934

Open
3v1n0 opened this issue Oct 20, 2022 · 2 comments
Open

Add suites: to add_test_setup() #10934

3v1n0 opened this issue Oct 20, 2022 · 2 comments

Comments

@3v1n0
Copy link
Contributor

3v1n0 commented Oct 20, 2022

Describe the bug
It can be convenient to define test setups that only run certain test suites

To Reproduce

test('false, 'false', suite: 'failing')
test('true', 'true', suite: 'working')
test('random', 'bash', args: ['-c', 'exit $(($RANDOM % 2))'], suite: 'flaky')
test('true2', 'true', suite: ['working', 'flaky'])

test_suite(default,
  is_default: true,
  exclude_suites: ['flaky'],
)

test_suite(bad-tests,
  exclude_suites: ['working'],
  suites: ['flaky', 'failing'],
)

Expected behavior
A clear and concise description of what you expected to happen.

running meson test --setup=bad-tests would only run false and random tests.

@bonzini
Copy link
Contributor

bonzini commented Nov 2, 2022

I looked at it some time ago, but the interaction between the arguments of test() and those of meson test was messy. Do you think the intersection of both should be run, or rather that meson test would override add_test_setup()?

@3v1n0
Copy link
Contributor Author

3v1n0 commented Nov 2, 2022

Well as normal rule, command line options always override default selections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants