From 70929f76b93ae735d879d5275a28c0d5777f8382 Mon Sep 17 00:00:00 2001 From: Treece Burgess Date: Sun, 1 Dec 2024 04:36:11 +0000 Subject: [PATCH] Adding active component check for individual component tests. --- .github/workflows/ci_papi_framework.sh | 5 ++--- .github/workflows/ci_per_component.sh | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_papi_framework.sh b/.github/workflows/ci_papi_framework.sh index 19c90a3aa..57f96928e 100755 --- a/.github/workflows/ci_papi_framework.sh +++ b/.github/workflows/ci_papi_framework.sh @@ -62,15 +62,14 @@ utils/papi_component_avail # active component check CURRENT_ACTIVE_COMPONENTS=$(utils/papi_component_avail | grep -A1000 'Active components' | grep "Name: " | awk '{printf "%s%s", sep, $2; sep=" "} END{print ""}') if [ "$COMPONENTS" = "cuda nvml rocm rocm_smi powercap powercap_ppc rapl sensors_ppc infiniband net appio io lustre stealtime coretemp lmsensors mx sde" ]; then - echo Comp [ "$CURRENT_ACTIVE_COMPONENTS" = "perf_event perf_event_uncore cuda nvml powercap net appio io stealtime coretemp lmsensors sde sysdetect" ] elif [ "$COMPONENTS" = "rocm rocm_smi" ]; then - echo rocm [ "$CURRENT_ACTIVE_COMPONENTS" = "perf_event perf_event_uncore rocm rocm_smi sysdetect" ] elif [ "$COMPONENTS" = "infiniband" ]; then - echo infini [ "$CURRENT_ACTIVE_COMPONENTS" = "perf_event perf_event_uncore infiniband sysdetect" ] else + # if the component from the .yml is not accounted for in the above + # elif's exit 1 fi diff --git a/.github/workflows/ci_per_component.sh b/.github/workflows/ci_per_component.sh index 178ba512c..7066a56ad 100755 --- a/.github/workflows/ci_per_component.sh +++ b/.github/workflows/ci_per_component.sh @@ -53,6 +53,11 @@ make -j4 # run PAPI utilities utils/papi_component_avail +# active component check +EXPECTED_ACTIVE_COMPONENTS=$(echo "perf_event perf_event_uncore sysdetect" | sed "s/perf_event_uncore/& $COMPONENT/") +CURRENT_ACTIVE_COMPONENTS=$(utils/papi_component_avail | grep -A1000 'Active components' | grep "Name: " | awk '{printf "%s%s", sep, $2; sep=" "} END{print ""}') +[ "$EXPECTED_ACTIVE_COMPONENTS" = "$CURRENT_ACTIVE_COMPONENTS" ] + # without '--with-shlib-tools' in ./configure if [ "$SHLIB" = "without" ]; then echo "Running full test suite for active components"