summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/recipes-support/ptest-runner
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-12-08 11:12:45 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-12-17 13:59:52 +0000
commit1c3c06842ac1b9c089d0a08e91c60f44e4844fac (patch)
tree21e97368be8f78a3e76b66dfda24c1d5e774519f /meta-agl-bsp/recipes-support/ptest-runner
parentc1e048fc05542d859115990312e0753ce2dea72e (diff)
SPEC-3723: restructure meta-agl
Goal is to reach a minimal meta-agl-core as base for IVI and IC work at the same time. Trim dependencies and move most 'demo' related recipes to meta-agl-demo. v2: changed to bbapend + .inc , added description v3: testbuild of all images v4: restore -test packagegroup and -qa images, compare manifests and adapt packagegroups. v5: rebased v6: merged meta-agl-distro into meta-agl-core, due to dependency on meta-oe, moved -test packagegroup and -qa images to own layer meta-agl-core-test v7: Fixed comments from Paul Barker v8: Update the markdown files v9: restore wayland/weston/agl-compositor recipes/appends, reworked to move app f/w specific changes to bbappends in meta-app-framework and only demo specific weston-init changes to meta-agl-demo v10: fix s/agldemo/aglcore/ missed in weston-init.bbappend Description: This patch is part 1 out of 2 large patches that implement the layer rework discussed during the previous workshop. Essentially meta-agl-core is the small but versatile new core layer of AGL serving as basis for the work done by the IC and IVI EGs. All demo related work is moved to meta-agl-demo in the 2nd patchset. This should be applied together as atomic change. The resulting meta-agl/* follows these guidelines: - only bsp adaptations in meta-agl-bsp - remove the agl-profile-* layers for simplicity -- the packagegroup-agl(-profile)-graphical and so on have been kept in meta-agl-demo - meta-agl-profile-core is now meta-agl-core - meta-agl-core does pass yocto-check-layer -- therefore use the bbappend + conditional + .inc file construct found in meta-virtualization - meta-agl/meta-security has been merged into meta-agl/meta-app-framework - meta-netboot does pass yocto-check-layer - meta-pipewire does pass yocto-check-layer Migration: All packagegroups are preserved but they're now enabled by 'agl-demo'. Bug-AGL: SPEC-3723 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ia6c6e5e6ce2b4ffa69ea94959cdc57c310ba7c53 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25769
Diffstat (limited to 'meta-agl-bsp/recipes-support/ptest-runner')
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch140
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend4
2 files changed, 0 insertions, 144 deletions
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch
deleted file mode 100644
index 6232c4fa4..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 11b29ce444610a07067a89b38e9e85c2162bbf67 Mon Sep 17 00:00:00 2001
-From: Tim Orling <timothy.t.orling@linux.intel.com>
-Date: Mon, 15 Oct 2018 18:30:42 -0700
-Subject: [PATCH 7/7] [WIP] Initial LAVA support
-
-Linaro Automated Validation Architecture (LAVA) launches a test suite
-on the target but thereafter only observes stdout.
-
-LAVA knows that a test case has started or ended based on signals
-emitted to stdout:
-(setup)
-<LAVA_SIGNAL_STARTTC test_case_name>
-(teardown)
-<LAVA_SIGNAL_ENDTC test_case_name>
-<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=test_case_name RESULT=pass|fail \
- [[ MEASUREMENT=numeric_measurement ][ UNITS=units_string]]>
-
-It is valid to have a measurement without units, but not units without a measurement.
-
-Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
-[updated for ptest-runner 2.3.2]
-Signed-off-by: Scott Murray <scott.murray@konsulko.com>
----
-diff --git a/flags.h b/flags.h
-new file mode 100644
-index 0000000..0dac223
---- /dev/null
-+++ b/flags.h
-@@ -0,0 +1,10 @@
-+/* SPDX-License-Identifier: GPL-2.0 */
-+
-+/* Flag bit definitions */
-+
-+#ifndef __FLAGS_H__
-+#define __FLAGS_H__
-+
-+#define LAVA_SIGNAL_ENABLE (0x0001)
-+
-+#endif /* __FLAGS_H__ */
-diff --git a/main.c b/main.c
-index 01d60f7..165370f 100644
---- a/main.c
-+++ b/main.c
-@@ -38,6 +38,7 @@
- #endif
-
- #include "utils.h"
-+#include "flags.h"
-
- #ifndef DEFAULT_DIRECTORY
- #define DEFAULT_DIRECTORY "/usr/lib"
-@@ -74,8 +75,9 @@ main(int argc, char *argv[])
- opts.timeout = DEFAULT_TIMEOUT;
- opts.ptests = NULL;
- opts.xml_filename = NULL;
-+ opts.flags = 0;
-
-- while ((opt = getopt(argc, argv, "d:e:lt:x:h")) != -1) {
-+ while ((opt = getopt(argc, argv, "d:e:lt:x:Lh")) != -1) {
- switch (opt) {
- case 'd':
- free(opts.directory);
-@@ -122,6 +124,11 @@ main(int argc, char *argv[])
- opts.xml_filename = strdup(optarg);
- CHECK_ALLOCATION(opts.xml_filename, 1, 1);
- break;
-+ case 'L':
-+ // set LAVA signal mode
-+ opts.flags |= LAVA_SIGNAL_ENABLE;
-+ fprintf(stdout, "LAVA_SIGNAL_ENABLE == %d\n", opts.flags);
-+ break;
- default:
- print_usage(stdout, argv[0]);
- exit(1);
-diff --git a/utils.c b/utils.c
-index a8ba190..19f9efa 100644
---- a/utils.c
-+++ b/utils.c
-@@ -47,6 +47,7 @@
-
- #include "ptest_list.h"
- #include "utils.h"
-+#include "flags.h"
-
- #define GET_STIME_BUF_SIZE 1024
- #define WAIT_CHILD_POLL_TIMEOUT_MS 200
-@@ -439,6 +440,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
- fprintf(fp, "START: %s\n", progname);
- PTEST_LIST_ITERATE_START(head, p)
- char *ptest_dir = strdup(p->run_ptest);
-+ char *ptest = strdup(p->ptest);
- if (ptest_dir == NULL) {
- rc = -1;
- break;
-@@ -480,11 +482,15 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
- int status;
- int fds[2]; fds[0] = pipefd_stdout[0]; fds[1] = pipefd_stderr[0];
- FILE *fps[2]; fps[0] = fp; fps[1] = fp_stderr;
-+ char result[5]; // pass\0, fail\0, skip\0
-
- if (setpgid(child, pgid) == -1) {
- fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno));
- }
-
-+ if (opts.flags & LAVA_SIGNAL_ENABLE) {
-+ fprintf(stdout, "<LAVA_SIGNAL_STARTTC %s>\n", ptest);
-+ }
- sttime = time(NULL);
- fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, sttime));
- fprintf(fp, "BEGIN: %s\n", ptest_dir);
-@@ -506,6 +512,14 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
-
- fprintf(fp, "END: %s\n", ptest_dir);
- fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, entime));
-+ if (opts.flags & LAVA_SIGNAL_ENABLE) {
-+ if (status)
-+ sprintf(result, "fail");
-+ else
-+ sprintf(result, "pass");
-+ fprintf(stdout, "<LAVA_SIGNAL_ENDTC %s>\n", ptest);
-+ fprintf(stdout, "<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=%s RESULT=%s>\n", ptest, result);
-+ }
- }
- PTEST_LIST_ITERATE_END
- fprintf(fp, "STOP: %s\n", progname);
-diff --git a/utils.h b/utils.h
-index aa53707..df11e24 100644
---- a/utils.h
-+++ b/utils.h
-@@ -39,9 +39,9 @@ struct ptest_options {
- int timeout;
- char **ptests;
- char *xml_filename;
-+ unsigned int flags;
- };
-
--
- extern void check_allocation1(void *, size_t, char *, int, int);
- extern struct ptest_list *get_available_ptests(const char *);
- extern int print_ptests(struct ptest_list *, FILE *);
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend
deleted file mode 100644
index 7a1d2a8f8..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://0007-WIP-Initial-LAVA-support.patch"
-