Skip to content

Commit a019e15

Browse files
committed
meson.build: Set RUST_BACKTRACE for all tests
We want to capture potential Rust backtraces on panics in our test logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in the add_test_setup environments, so that all our tests get run with this environment variable set. This makes the setting of that variable in the gitlab CI template redundant, so we can remove it. Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-id: [email protected]
1 parent cc7abc3 commit a019e15

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.gitlab-ci.d/buildtest-template.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
stage: test
6464
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
6565
script:
66-
- export RUST_BACKTRACE=1
6766
- source scripts/ci/gitlab-ci-section
6867
- section_start buildenv "Setting up to run tests"
6968
- scripts/git-submodule.sh update roms/SLOF

meson.build

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
55

66
meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
77

8-
add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
9-
add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
10-
add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
8+
add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
9+
env: ['RUST_BACKTRACE=1'])
10+
add_test_setup('slow', exclude_suites: ['thorough'],
11+
env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
12+
add_test_setup('thorough',
13+
env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
1114

1215
meson.add_postconf_script(find_program('scripts/symlink-install-tree.py'))
1316

0 commit comments

Comments
 (0)