Fix some bitrot in tests.rs, and allow the unit tests to be run via
"meson test".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
rust/qemu-api/meson.build | 3 +++
rust/qemu-api/src/tests.rs | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build
index 42ea815fa5a..436e2f1e836 100644
--- a/rust/qemu-api/meson.build
+++ b/rust/qemu-api/meson.build
@@ -5,6 +5,7 @@ _qemu_api_rs = static_library(
'src/lib.rs',
'src/definitions.rs',
'src/device_class.rs',
+ 'src/tests.rs',
],
{'.' : bindings_rs},
),
@@ -19,6 +20,8 @@ _qemu_api_rs = static_library(
],
)
+rust.test('rust-qemu-api-tests', _qemu_api_rs)
+
qemu_api = declare_dependency(
link_with: _qemu_api_rs,
)
diff --git a/rust/qemu-api/src/tests.rs b/rust/qemu-api/src/tests.rs
index df54edbd4e2..f0cd4d5d716 100644
--- a/rust/qemu-api/src/tests.rs
+++ b/rust/qemu-api/src/tests.rs
@@ -43,7 +43,7 @@ pub struct DummyState {
dummy_class_init,
props => DUMMY_PROPERTIES,
realize_fn => None,
- reset_fn => None,
+ legacy_reset_fn => None,
vmsd => VMSTATE,
}
}
--
2.46.2