From a56b912b9b9a42b4ca19ca1f15a2261ce367ee99 Mon Sep 17 00:00:00 2001
From: Esben Haabendal <esben.haabendal@huawei.com>
Date: Tue, 5 Jul 2022 17:13:43 +0200
Subject: [PATCH] openharmony-standard: Backport OPENHARMONY_PTEST_IS_BROKEN to
 3.0

Allow marking broken ptest suites so we can fix things gradually while
keeping track of regressions in the components we already have fixed.

Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
---
 .../openharmony/openharmony-standard_3.0.bb           | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb
index abb768eb..b7a92f03 100644
--- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb
+++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb
@@ -346,6 +346,17 @@ RDEPENDS:${PN}-hilog       += "musl libcxx"
 RDEPENDS:${PN}-hilog-ptest += "musl libcxx"
 RDEPENDS:${PN}-hilog       += "${PN}-libutilsecurec"
 
+
+# Disable all ptest suites that are know to not work for now. When the x-bit is
+# not set, the ptest is visible (using `ptest-runner -l`), but no test cases
+# will be run when executing it.
+# TODO: Fix all components and tests and remove all of this
+do_install_ptest:append() {
+    for component in ${OPENHARMONY_PTEST_IS_BROKEN} ; do
+        chmod -x ${D}${libdir}/${BPN}-$component/ptest/run-ptest
+    done
+}
+
 EXCLUDE_FROM_SHLIBS = "1"
 
 # To avoid excessive diskspace blowup, we are stripping our executables
-- 
GitLab