summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorThomas Roos <throos@amazon.de>2023-05-17 14:13:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-22 10:53:49 +0100
commit6c8fe83bb5d1aaa11307253e8ab33c2d7f1a4a3f (patch)
tree1068ac4bf68dc2f7c3105c34c380780bc6fd7c4b /meta-selftest
parenta0998bf22b5f13ef68c9282e41f18a35b79cc067 (diff)
downloadpoky-6c8fe83bb5d1aaa11307253e8ab33c2d7f1a4a3f.tar.gz
oeqa: adding selftest-hello and use it to speed up tests
Adding a selftest version of hello world to run it in tests where no download is necessary. Also using this in several tests to speed them up. Using the -native version wherever possible will also speed up tests a lot. [YOCTO #11142] (From OE-Core rev: c3f26b63934888df0e3cd563c1c2804eb78a368e) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/recipes-test/selftest-hello/files/helloworld.c8
-rw-r--r--meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb19
2 files changed, 27 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
new file mode 100644
index 0000000000..fc7169b7b8
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
@@ -0,0 +1,8 @@
1#include <stdio.h>
2
3int main(void)
4{
5 printf("Hello world!\n");
6
7 return 0;
8}
diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
new file mode 100644
index 0000000000..547587bef4
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -0,0 +1,19 @@
1DESCRIPTION = "Simple helloworld application -- selftest variant"
2SECTION = "examples"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6SRC_URI = "file://helloworld.c"
7
8S = "${WORKDIR}"
9
10do_compile() {
11 ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
12}
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 helloworld ${D}${bindir}
17}
18
19BBCLASSEXTEND = "native nativesdk" \ No newline at end of file