diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-17 11:30:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-17 11:33:22 +0100 |
commit | 460fabb834758c8a3c47825d44a2363c585786b2 (patch) | |
tree | 8f5d0ff6cc3071fdc4b841a910b487bd27328f4d /meta/recipes-devtools/qemu | |
parent | 7105586a68d0d1ef22f7bf03f748ad57b1f849b7 (diff) | |
download | poky-460fabb834758c8a3c47825d44a2363c585786b2.tar.gz |
oeqa/selftest/oescripts: Fix qemu-helper selftest
The updated selftest was assuming qemu-bridge-helper was available on the host
system which isn't always the case. Tweak the test case to avoid this issue by
adding dedicated help output and checking for this specifically.
(From OE-Core rev: 4a80e95d1f59e0ddcedde3f64d0a0d1dc48a6e4d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper.c b/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper.c index 9434e1d269..c34aa00567 100644 --- a/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper.c +++ b/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <stdio.h> | 9 | #include <stdio.h> |
10 | #include <string.h> | ||
10 | #include <unistd.h> | 11 | #include <unistd.h> |
11 | #include <stdlib.h> | 12 | #include <stdlib.h> |
12 | 13 | ||
@@ -25,6 +26,11 @@ int main(int argc, char** argv) { | |||
25 | return 1; | 26 | return 1; |
26 | } | 27 | } |
27 | 28 | ||
29 | if (argc == 2 && strcmp(argv[1], "--help") == 0) { | ||
30 | fprintf(stderr, "Helper function to find and exec qemu-bridge-helper. Set QEMU_BRIDGE_HELPER to override default search path\n"); | ||
31 | return 0; | ||
32 | } | ||
33 | |||
28 | try_program("/usr/libexec/qemu-bridge-helper", argv); | 34 | try_program("/usr/libexec/qemu-bridge-helper", argv); |
29 | try_program("/usr/lib/qemu/qemu-bridge-helper", argv); | 35 | try_program("/usr/lib/qemu/qemu-bridge-helper", argv); |
30 | 36 | ||