From e94cb66af7f0d1a680e1933ef35cbfae5923a4a3 Mon Sep 17 00:00:00 2001 From: Kartik Nema Date: Mon, 3 Aug 2026 15:50:17 +0530 Subject: [PATCH] Run URM Tests through Debian Packages On platforms which use Debian builds, like Glymur, enable test case runs by installing the appropriate debian tests package for URM, "userspace-resource-manager-tests". This package installs the necessary binaries and configs needed for testing. The run.sh script already has instructions for running the tests, fetching and reporting the results in an appropriate manner. Signed-off-by: Kartik Nema --- Runner/config/pkg_command_map.conf | 15 +++++++++++++++ .../userspace-resource-manager/run.sh | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/Runner/config/pkg_command_map.conf b/Runner/config/pkg_command_map.conf index 4beb2afab..ea6e316b4 100755 --- a/Runner/config/pkg_command_map.conf +++ b/Runner/config/pkg_command_map.conf @@ -188,6 +188,21 @@ opkg:Sensors:sns_test=qcom-sensors-api qcom-sensors-core qcom-sensors-registry q debian:package-set:fastrpc=fastrpc-support fastrpc-tests ubuntu:package-set:fastrpc=fastrpc-support fastrpc-tests +# --------------------------------------------------------------------------- +# Qualcomm userspace-resource-manager package set. +# +# Used by tests that explicitly call: +# pkg_ensure_required_package_set_present urm +# +# The runner only checks that the required package-set definition exists. +# No qcom-distro/rpm mapping is currently provided for this package set, and +# absent mappings are intentionally ignored by the runner. As a result, Yocto +# remains a no-op unless a supported mapping is added in the future. +# --------------------------------------------------------------------------- + +debian:package-set:urm=userspace-resource-manager userspace-resource-manager-tests +ubuntu:package-set:urm=userspace-resource-manager userspace-resource-manager-tests + # --------------------------------------------------------------------------- # Qualcomm Graphics / Adreno optional overlay package set. # diff --git a/Runner/suites/Performance/userspace-resource-manager/run.sh b/Runner/suites/Performance/userspace-resource-manager/run.sh index 5dcbe771e..a318fa1a8 100755 --- a/Runner/suites/Performance/userspace-resource-manager/run.sh +++ b/Runner/suites/Performance/userspace-resource-manager/run.sh @@ -27,6 +27,7 @@ if [ -z "${__INIT_ENV_LOADED:-}" ]; then . "$INIT_ENV" __INIT_ENV_LOADED=1 fi + # shellcheck disable=SC1090,SC1091 . "$TOOLS/functestlib.sh" @@ -43,6 +44,13 @@ test_path="$(find_test_case_by_name "$TESTNAME")" cd "$test_path" || exit 1 RES_FILE="./${TESTNAME}.res" +# Optional generic package-set recovery. +# This must be a clean no-op when no package-set mapping exists for the active OS/provider. +if [ -f "$TOOLS/lib_pkg_provider.sh" ]; then + # shellcheck disable=SC1091 + . "$TOOLS/lib_pkg_provider.sh" +fi + log_info "=== Checking Dependencies ===" if ! check_dependencies awk grep pgrep date printf; then log_skip "$TESTNAME SKIP – base tools missing" @@ -133,6 +141,16 @@ while [ $# -gt 0 ]; do shift done +if pkg_lookup_package_set urm >/dev/null 2>&1; then + if ! pkg_ensure_required_package_set_present urm; then + log_skip "$TESTNAME SKIP - failed to ensure required package set: urm" + echo "$TESTNAME SKIP" >"$RES_FILE" + exit 0 + fi +else + log_info "No URM package-set mapping for this OS/provider; using image-provided assets" +fi + # ---------- Helpers ---------- approved_tests() { printf '%s\n' "$APPROVED_TESTS" | awk 'NF'