Skip to content

Commit

Permalink
scripts/mtest2make: add support for SPEED=thorough
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Jan 28, 2022
1 parent bcda7b1 commit 3e233e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions meson.build
Expand Up @@ -3,8 +3,9 @@ project('qemu', ['c'], meson_version: '>=0.58.2',
'b_staticpic=false', 'stdsplit=false'],
version: files('VERSION'))

add_test_setup('quick', exclude_suites: 'slow', is_default: true)
add_test_setup('slow', env: ['G_TEST_SLOW=1', 'SPEED=slow'])
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'])

not_found = dependency('', required: false)
keyval = import('keyval')
Expand Down
10 changes: 7 additions & 3 deletions scripts/mtest2make.py
Expand Up @@ -23,8 +23,9 @@ def names(self, base):
print('''
SPEED = quick
.speed.quick = $(foreach s,$(sort $(filter-out %-slow, $1)), --suite $s)
.speed.slow = $(foreach s,$(sort $1), --suite $s)
.speed.quick = $(foreach s,$(sort $(filter-out %-slow %-thorough, $1)), --suite $s)
.speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), --suite $s)
.speed.thorough = $(foreach s,$(sort $1), --suite $s)
.mtestargs = --no-rebuild -t 0
ifneq ($(SPEED), quick)
Expand Down Expand Up @@ -52,11 +53,14 @@ def process_tests(test, targets, suites):
for s in test_suites:
# The suite name in the introspection info is "PROJECT:SUITE"
s = s.split(':')[1]
if s == 'slow':
if s == 'slow' or s == 'thorough':
continue
if s.endswith('-slow'):
s = s[:-5]
suites[s].speeds.append('slow')
if s.endswith('-thorough'):
s = s[:-9]
suites[s].speeds.append('thorough')
suites[s].deps.update(deps)

def emit_prolog(suites, prefix):
Expand Down

0 comments on commit 3e233e2

Please sign in to comment.