summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2026-01-12 14:26:17 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2026-05-21 12:39:54 +0100
commit336213f405b8391ef1346588e9bf6e75ee34f759 (patch)
tree70ed04160be662c51946c7ffc9b291840a6ed157 /scripts
parent87c14d88ec5e321b7f9d0ae9d11d1783e24b6b16 (diff)
downloadqemu-336213f405b8391ef1346588e9bf6e75ee34f759.tar.gz
qemu-336213f405b8391ef1346588e9bf6e75ee34f759.zip
scripts/mtest2make: ensure output has stable sorting
When debugging mtest2make.py changes it is important to be able to compare the old and new output. This requires that any lists in the output have stable sort ordering. Acked-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mtest2make.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
index 4b252defc3..915f02d600 100644
--- a/scripts/mtest2make.py
+++ b/scripts/mtest2make.py
@@ -67,8 +67,10 @@ def process_tests(test, targets, suites):
suites[s].speeds.add('thorough')
def emit_prolog(suites, prefix):
- all_targets = ' '.join((f'{prefix}-{k}' for k in suites.keys()))
- all_xml = ' '.join((f'{prefix}-report-{k}.junit.xml' for k in suites.keys()))
+ all_targets = ' '.join((f'{prefix}-{k}'
+ for k in sorted(suites.keys())))
+ all_xml = ' '.join((f'{prefix}-report-{k}.junit.xml'
+ for k in sorted(suites.keys())))
print()
print(f'all-{prefix}-targets = {all_targets}')
print(f'all-{prefix}-xml = {all_xml}')
@@ -81,12 +83,12 @@ def emit_prolog(suites, prefix):
print(f'\t$(MAKE) {prefix}$* MTESTARGS="$(MTESTARGS) --logbase {prefix}-report$*" && ln -f meson-logs/$@ .')
def emit_suite(name, suite, prefix):
- deps = ' '.join(suite.deps)
+ deps = ' '.join(sorted(suite.deps))
print()
print(f'.{prefix}-{name}.deps = {deps}')
print(f'.ninja-goals.check-build += $(.{prefix}-{name}.deps)')
- names = ' '.join(suite.names(name))
+ names = ' '.join(sorted(suite.names(name)))
targets = f'{prefix}-{name} {prefix}-report-{name}.junit.xml'
if not name.endswith('-slow') and not name.endswith('-thorough'):
targets += f' {prefix} {prefix}-report.junit.xml'