diff options
author | Thomas Roos <throos@amazon.de> | 2023-05-17 14:13:53 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-06-14 04:14:25 -1000 |
commit | 387963e269f64f571983bb58e0ba7d39abe4d674 (patch) | |
tree | 049fec30c363b87371bfb2de0677428610d8c31d /meta-selftest | |
parent | 7b8d2c3c2e20fbd532e91bee787cfa7eb4f4ab8f (diff) | |
download | poky-387963e269f64f571983bb58e0ba7d39abe4d674.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: 95241ece5fcef53901b97f96ae961cea208ca31a)
Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit c3f26b63934888df0e3cd563c1c2804eb78a368e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta-selftest')
-rw-r--r-- | meta-selftest/recipes-test/selftest-hello/files/helloworld.c | 8 | ||||
-rw-r--r-- | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 19 |
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 | |||
3 | int 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 @@ | |||
1 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
2 | SECTION = "examples" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | SRC_URI = "file://helloworld.c" | ||
7 | |||
8 | S = "${WORKDIR}" | ||
9 | |||
10 | do_compile() { | ||
11 | ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
12 | } | ||
13 | |||
14 | do_install() { | ||
15 | install -d ${D}${bindir} | ||
16 | install -m 0755 helloworld ${D}${bindir} | ||
17 | } | ||
18 | |||
19 | BBCLASSEXTEND = "native nativesdk" \ No newline at end of file | ||