Skip to contentSkip to conversation

rust: build: add back common and util tests

PATCH In review Paolo Bonzini 3 participants 3 messages Sep 19, 2025 – Sep 23, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: build: add back common and util tests

These were dropped by mistake when extracting the crates.

---
 rust/common/meson.build | 3 +++
 rust/util/meson.build   | 4 ++++
 2 files changed, 7 insertions(+)
rust/common/meson.build +3 -0
index b805e0faf57..07d073182ed 100644
@@ -24,6 +24,9 @@ _common_rs = static_library(
 
 common_rs = declare_dependency(link_with: [_common_rs])
 
+rust.test('rust-common-tests', _common_rs,
+          suite: ['unit', 'rust'])
+
 # 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/util/meson.build +4 -0
index 87a893673d2..96330504459 100644
@@ -44,6 +44,10 @@ _util_rs = static_library(
 
 util_rs = declare_dependency(link_with: [_util_rs], dependencies: [qemuutil, qom])
 
+rust.test('rust-util-tests', _util_rs,
+          dependencies: [qemuutil, qom],
+          suite: ['unit', 'rust'])
+
 # 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".
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Paolo Bonzini

These were dropped by mistake when extracting the crates.

---

Quoted 37 lines
 rust/common/meson.build | 3 +++
 rust/util/meson.build   | 4 ++++
 2 files changed, 7 insertions(+)
rust/common/meson.build +3 -0
index b805e0faf57..07d073182ed 100644
@@ -24,6 +24,9 @@ _common_rs = static_library(
 
 common_rs = declare_dependency(link_with: [_common_rs])
 
+rust.test('rust-common-tests', _common_rs,
+          suite: ['unit', 'rust'])
+
 # 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/util/meson.build +4 -1
index 87a893673d2..96330504459 100644
@@ -44,6 +44,10 @@ _util_rs = static_library(
 
 util_rs = declare_dependency(link_with: [_util_rs], dependencies: [qemuutil, qom])
 
+rust.test('rust-util-tests', _util_rs,
+          dependencies: [qemuutil, qom],
+          suite: ['unit', 'rust'])
+
 # 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".
--

2.51.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Date: Fri, 19 Sep 2025 10:36:17 +0200
From: Paolo Bonzini <[email protected]>
Subject: [PATCH] rust: build: add back common and util tests

These were dropped by mistake when extracting the crates.

---
 rust/common/meson.build | 3 +++
 rust/util/meson.build   | 4 ++++
 2 files changed, 7 insertions(+)>