Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Runner/config/pkg_command_map.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
18 changes: 18 additions & 0 deletions Runner/suites/Performance/userspace-resource-manager/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if [ -z "${__INIT_ENV_LOADED:-}" ]; then
. "$INIT_ENV"
__INIT_ENV_LOADED=1
fi

# shellcheck disable=SC1090,SC1091
. "$TOOLS/functestlib.sh"

Expand All @@ -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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package recovery currently runs before the test lock and before CLI parsing. This means concurrent invocations can both enter package installation, and even "--help" performs package verification or installation. Consider sourcing the provider here but moving the package recovery operation after argument parsing and lock acquisition. At minimum, ensure "--help" remains side-effect free

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved pkg_ensure_required_package_set_present urm; later in the file post cli argument processing block.

# 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"
Expand Down Expand Up @@ -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'
Expand Down
Loading