Signed-off-by: Vinay Kumar <[email protected]>
---
meta/recipes-devtools/rust/rust-test.inc | 34 +++++++++---------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/meta/recipes-devtools/rust/rust-test.inc
b/meta/recipes-devtools/rust/rust-test.inc
index 0d3eaa10cf..3a9b5b367c 100644
--- a/meta/recipes-devtools/rust/rust-test.inc
+++ b/meta/recipes-devtools/rust/rust-test.inc
@@ -492,29 +492,21 @@ rust_runx () {
}
rust_runx[vardepsexclude] += "PARALLEL_MAKE"
+# We have to build target specific remote-test-server
+# Reference link -
https://rustc-dev-guide.rust-lang.org/tests/intro.html#running-tests-on-a-remote-machine
do_compile () {
- rust_runx build
+ rust_runx build src/tools/remote-test-server --target "${RUST_TARGET_SYS}"
}
-rust_do_install () {
- mkdir -p ${D}${bindir}
- cp build/${HOST_SYS}/stage2/bin/* ${D}${bindir}
+# To test the rust
+# Copy remote-test-server to qemu-image and execute remote-test-server on
qemu-image through ssh in background.
+do_check[dirs] += "${B}"
+do_check[nostamp] = "1"
+do_check () {
+ scp -P 2222 -o StrictHostKeyChecking=no
build/${SNAPSHOT_BUILD_SYS}/stage2-tools-bin/remote-test-server
[email protected]:~/
+ ssh -p 2222 -o StrictHostKeyChecking=no -f [email protected]
"~/remote-test-server -v remote"
- mkdir -p ${D}${libdir}/rustlib
- cp -pRd build/${HOST_SYS}/stage2/lib/* ${D}${libdir}
- # Remove absolute symlink so bitbake doesn't complain
- rm -f ${D}${libdir}/rustlib/src/rust
-
- # Install our custom target.json files
- local td="${D}${libdir}/rustlib/"
- install -d "$td"
- for tgt in "${WORKDIR}/targets/"* ; do
- install -m 0644 "$tgt" "$td"
- done
-}
-
-
-do_install () {
- rust_do_install
+ export TEST_DEVICE_ADDR="127.0.0.1:12345"
+ rust_runx test --no-fail-fast --target "${RUST_TARGET_SYS}" > summary.txt
2> /dev/null
}
-# ex: sts=4 et sw=4 ts=8
+addtask do_check after do_compile
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150463):
https://lists.openembedded.org/g/openembedded-core/message/150463
Mute This Topic: https://lists.openembedded.org/mt/82112809/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-