Add two new targets, check-migration and check-migration-quick to allow dividing migration tests into a quick set and a slow set. With this it'll be possible to reduce the amount of migration tests that run by default as part of 'make check'.
Keep under the 'migration-quick' suite only a few tests to serve as sanity check for every build and move the rest under the 'migration' suite. Signed-off-by: Fabiano Rosas <faro...@suse.de> --- meson.build | 6 +++--- tests/Makefile.include | 2 ++ tests/qtest/meson.build | 47 +++++++++++++++++++++++++++++++++-------- 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 4ea1984fc5..92d38691f9 100644 --- a/meson.build +++ b/meson.build @@ -3,9 +3,9 @@ project('qemu', ['c'], meson_version: '>=1.1.0', 'b_staticpic=false', 'stdsplit=false', 'optimization=2', 'b_pie=true'], version: files('VERSION')) -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true) -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow']) -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough']) +add_test_setup('quick', exclude_suites: ['slow', 'thorough', 'migration'], is_default: true) +add_test_setup('slow', exclude_suites: ['thorough', 'migration-quick'], env: ['G_TEST_SLOW=1', 'SPEED=slow']) +add_test_setup('thorough', exclude_suites: ['migration-quick'], env: ['G_TEST_SLOW=1', 'SPEED=thorough']) meson.add_postconf_script(find_program('scripts/symlink-install-tree.py')) diff --git a/tests/Makefile.include b/tests/Makefile.include index 010369bd3a..79c1350bfb 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -11,6 +11,8 @@ check-help: @echo " $(MAKE) check-qtest Run qtest tests" @echo " $(MAKE) check-functional Run python-based functional tests" @echo " $(MAKE) check-functional-TARGET Run functional tests for a given target" + @echo " $(MAKE) check-migration-quick Run a small set of migration tests" + @echo " $(MAKE) check-migration Run all migration tests" @echo " $(MAKE) check-unit Run qobject tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index b207e38696..27a802474a 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -406,14 +406,43 @@ foreach dir : target_dirs test: executable(test, src, dependencies: deps) } endif - test('qtest-@0@/@1@'.format(target_base, test), - qtest_executables[test], - depends: [test_deps, qtest_emulator, emulator_modules], - env: qtest_env, - args: ['--tap', '-k'], - protocol: 'tap', - timeout: slow_qtests.get(test, 60), - priority: slow_qtests.get(test, 60), - suite: ['qtest', 'qtest-' + target_base]) + + # The migration-test test runs several slow sub-tests. Add it to + # two separate targets, one for executing a few tests + # (migration-quick) and another for executing the full set + # (migration). This is done to reduce the amount of tests that run + # via make check. + if test == 'migration-test' + foreach opts : [ + { + 'test-args': ['--tap', '-k', '-m', 'slow'], + 'test-suite': ['migration'] + }, + { + 'test-args': ['--tap', '-k', '-m', 'quick'], + 'test-suite': ['migration-quick'] + }] + + test(target_base, + qtest_executables[test], + depends: [test_deps, qtest_emulator, emulator_modules], + env: qtest_env, + args: opts['test-args'], + protocol: 'tap', + timeout: slow_qtests.get(test, 60), + priority: slow_qtests.get(test, 60), + suite: opts['test-suite']) + endforeach + else + test('qtest-@0@/@1@'.format(target_base, test), + qtest_executables[test], + depends: [test_deps, qtest_emulator, emulator_modules], + env: qtest_env, + args: ['--tap', '-k'], + protocol: 'tap', + timeout: slow_qtests.get(test, 60), + priority: slow_qtests.get(test, 60), + suite: ['qtest', 'qtest-' + target_base]) + endif endforeach endforeach -- 2.35.3