diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-04-05 10:33:09 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-03 22:42:18 +0200 |
| commit | f620cadc0c24ae414b46204e57a82f7bf586d2c4 (patch) | |
| tree | ff502e97b130ceddcc16c274b43fc978f6ef8076 /rust/qemu-api/meson.build | |
| parent | 53de966c3e8e6b9db3a81e8081be8e8275a0c6ee (diff) | |
| download | focaccia-qemu-f620cadc0c24ae414b46204e57a82f7bf586d2c4.tar.gz focaccia-qemu-f620cadc0c24ae414b46204e57a82f7bf586d2c4.zip | |
rust: add qemu-api doctests to "meson test"
Doctests are weird. They are essentially integration tests, but they're "ran" by executing rustdoc --test, which takes a compiler-ish command line. This is supported by Meson 1.8.0. Because they run the linker and need all the .o files, run them in the build jobs rather than the test jobs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/meson.build')
| -rw-r--r-- | rust/qemu-api/meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build index 62068352b0..b532281e8c 100644 --- a/rust/qemu-api/meson.build +++ b/rust/qemu-api/meson.build @@ -45,6 +45,15 @@ rust.test('rust-qemu-api-tests', _qemu_api_rs, qemu_api = declare_dependency(link_with: [_qemu_api_rs], dependencies: [qemu_api_macros, qom, hwcore, chardev, migration]) +# Doctests are essentially integration tests, so they need the same dependencies. +# Note that running them requires the object files for C code, so place them +# in a separate suite that is run by the "build" CI jobs rather than "check". +rust.doctest('rust-qemu-api-doctests', + _qemu_api_rs, + protocol: 'rust', + dependencies: qemu_api, + suite: ['doc', 'rust']) + test('rust-qemu-api-integration', executable( 'rust-qemu-api-integration', |