From 747eb165a15238bc3c5e92b4a35bfe59027bd0c3 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Jan-Simon=20M=C3=B6ller?= <jsmoeller@linuxfoundation.org>
Date: Sat, 14 Oct 2017 18:35:05 +0200
Subject: [PATCH] Add feature for enabling the YP ptest capabilities
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

This change adds a feature 'agl-ptest' that can be used to enable the addition
of the 'ptest' packages to the final image.
See the YP documentation about ptest:
- https://wiki.yoctoproject.org/wiki/Ptest
- http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#testing-packages-with-ptest

TLDR: enable feature +
      build image +
      boot image +
      login +
      call 'ptest-runner' +
      go get some coffee, go for a walk or run it just overnight

Bug-AGL: SPEC-911

Change-Id: Ifbe7b4144a9e1071295da58e26e8a8bd2260cd88
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11327
Reviewed-by: Thomas Rini <trini@konsulko.com>
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
---
 templates/feature/agl-ci-snapshot-features-nogfx/included.dep | 2 +-
 templates/feature/agl-ci-snapshot-features/included.dep       | 2 +-
 templates/feature/agl-ptest/90_local.conf.inc                 | 7 +++++++
 3 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 templates/feature/agl-ptest/90_local.conf.inc

diff --git a/templates/feature/agl-ci-snapshot-features-nogfx/included.dep b/templates/feature/agl-ci-snapshot-features-nogfx/included.dep
index 0a88d5ef9..ba9820a46 100644
--- a/templates/feature/agl-ci-snapshot-features-nogfx/included.dep
+++ b/templates/feature/agl-ci-snapshot-features-nogfx/included.dep
@@ -1 +1 @@
-agl-devel agl-netboot agl-appfw-smack agl-isafw agl-archiver
\ No newline at end of file
+agl-devel agl-netboot agl-appfw-smack agl-isafw agl-archiver agl-ptest
diff --git a/templates/feature/agl-ci-snapshot-features/included.dep b/templates/feature/agl-ci-snapshot-features/included.dep
index 1f68010e0..b09eff04b 100644
--- a/templates/feature/agl-ci-snapshot-features/included.dep
+++ b/templates/feature/agl-ci-snapshot-features/included.dep
@@ -1 +1 @@
-agl-demo agl-devel agl-netboot agl-appfw-smack agl-isafw agl-archiver agl-sdl
+agl-demo agl-devel agl-netboot agl-appfw-smack agl-archiver agl-sdl agl-ptest
diff --git a/templates/feature/agl-ptest/90_local.conf.inc b/templates/feature/agl-ptest/90_local.conf.inc
new file mode 100644
index 000000000..f7fc9392b
--- /dev/null
+++ b/templates/feature/agl-ptest/90_local.conf.inc
@@ -0,0 +1,7 @@
+
+# Enabling ptest in image ...
+
+DISTRO_FEATURES_append = " ptest"
+EXTRA_IMAGE_FEATURES_append = " ptest-pkgs"
+
+# / ptest
\ No newline at end of file
-- 
2.16.6