From 85514690d11e5ed3b235d2a5d5579d59d92edc9e Mon Sep 17 00:00:00 2001
From: Peter Hoyes <Peter.Hoyes@arm.com>
Date: Wed, 13 Jul 2022 18:38:09 +0100
Subject: [PATCH] zephyrtest: Enable use of TESTIMAGE_AUTO

When TESTIMAGE_AUTO is enabled, the do_testimage task is inserted after
do_image_complete and before do_build so that the test suites
automatically run as part of the image build.

However, do_testdata_write is currently constrained to run only before
do_build, so it likely won't execute prior to do_testimage. Change the
"before" constraint to do_testimage do that the testdata is always
generated prior to running the testimage task.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
 meta-zephyr-core/classes/zephyrtest.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-zephyr-core/classes/zephyrtest.bbclass b/meta-zephyr-core/classes/zephyrtest.bbclass
index 248fd15..aa48e6c 100644
--- a/meta-zephyr-core/classes/zephyrtest.bbclass
+++ b/meta-zephyr-core/classes/zephyrtest.bbclass
@@ -50,4 +50,4 @@ python testdata_clean() {
         os.remove(fname)
 }
 
-addtask do_testdata_write before do_build after do_deploy
+addtask do_testdata_write before do_testimage after do_deploy
-- 
GitLab