diff options
author | Thomas Roos <throos@amazon.de> | 2023-05-17 14:13:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-22 10:53:44 +0100 |
commit | c3f26b63934888df0e3cd563c1c2804eb78a368e (patch) | |
tree | 1704971c3924542cc1c0b3102175c7a4440969ef /meta-selftest/recipes-test | |
parent | 13711656b1470e9d440bcf83e9fc9dc7ab2292f9 (diff) | |
download | openembedded-core-c3f26b63934888df0e3cd563c1c2804eb78a368e.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]
Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'meta-selftest/recipes-test')
-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 @@ +#include <stdio.h> + +int main(void) +{ + printf("Hello world!\n"); + + return 0; +} 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 @@ +DESCRIPTION = "Simple helloworld application -- selftest variant" +SECTION = "examples" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://helloworld.c" + +S = "${WORKDIR}" + +do_compile() { + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 helloworld ${D}${bindir} +} + +BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file |