mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
meta-selftest: hello-rs: Simple rust test recipe
(From OE-Core rev: 885e8e1fbfce79170ff7544dec5406d724da2560) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
6bc41cf96f
commit
781bd05a4b
|
@ -0,0 +1,8 @@
|
|||
# Autogenerated with 'bitbake -c update_crates hello-rs'
|
||||
|
||||
# from Cargo.lock
|
||||
SRC_URI += " \
|
||||
crate://crates.io/figlet-rs/0.1.5 \
|
||||
"
|
||||
|
||||
SRC_URI[figlet-rs-0.1.5.sha256sum] = "4742a071cd9694fc86f9fa1a08fa3e53d40cc899d7ee532295da2d085639fbc5"
|
|
@ -0,0 +1,24 @@
|
|||
From 3aea1ece0ca6ac0bf0ffe42736827af22966f767 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Kiernan <alexk@zuma.ai>
|
||||
Date: Wed, 27 Dec 2023 09:55:48 +0000
|
||||
Subject: [PATCH] Greet "OE-Core"
|
||||
|
||||
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
|
||||
Upstream-Status: Inappropriate
|
||||
---
|
||||
src/main.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index f4a310758b19..224eca65c38d 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -3,7 +3,7 @@ use hello_lib::greet;
|
||||
|
||||
fn main() {
|
||||
let standard_font = FIGfont::standard().unwrap();
|
||||
- let greeting = greet(None);
|
||||
+ let greeting = greet(Some("OE-Core"));
|
||||
let figure = standard_font.convert(&greeting);
|
||||
println!("{}", figure.unwrap());
|
||||
}
|
22
meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb
Normal file
22
meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb
Normal file
|
@ -0,0 +1,22 @@
|
|||
SUMMARY = "Simple hello world example"
|
||||
HOMEPAGE = "https://github.com/akiernan/hello-bin"
|
||||
LICENSE = "Unlicense"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7246f848faa4e9c9fc0ea91122d6e680"
|
||||
|
||||
SRC_URI = "git://github.com/akiernan/hello-bin.git;protocol=https;branch=main;subpath=rust \
|
||||
file://0001-Greet-OE-Core.patch \
|
||||
git://github.com/akiernan/hello-lib.git;protocol=https;branch=main;name=hello-lib;destsuffix=hello-lib;type=git-dependency \
|
||||
"
|
||||
SRCREV = "d3d096eda182644868f8e7458dcfa538ff637db3"
|
||||
|
||||
SRCREV_FORMAT .= "_hello-lib"
|
||||
SRCREV_hello-lib = "59c84574e844617043cf337bc8fa537cf87ad8ae"
|
||||
|
||||
S = "${WORKDIR}/rust"
|
||||
|
||||
inherit cargo cargo-update-recipe-crates ptest-cargo
|
||||
|
||||
# Remove this when the recipe is reproducible
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
|
||||
require ${BPN}-crates.inc
|
Loading…
Reference in New Issue
Block a user