From 74e9bfa68f95db763bfd31751bcb28c673f08e87 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 12 Nov 2025 11:54:14 +0100 Subject: [PATCH 1/5] Infer the ReFrame partition name based on the node_type listed in the job's cfg --- bot/test.sh | 7 +++++++ test_suite.sh | 12 +++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/bot/test.sh b/bot/test.sh index 93907de5..da7d40cd 100755 --- a/bot/test.sh +++ b/bot/test.sh @@ -189,6 +189,10 @@ EESSI_OS_TYPE=$(cfg_get_value "architecture" "os_type") export EESSI_OS_TYPE=${EESSI_OS_TYPE:-linux} echo "bot/test.sh: EESSI_OS_TYPE='${EESSI_OS_TYPE}'" +# Get node_type from .architecture.node_type in ${JOB_CFG_FILE} +export BOT_NODE_TYPE=$(cfg_get_value "architecture" "node_type") +echo "bot/test.sh: BOT_NODE_TYPE='${BOT_NODE_TYPE}" + # prepare arguments to eessi_container.sh common to build and tarball steps declare -a COMMON_ARGS=() COMMON_ARGS+=("--verbose") @@ -237,6 +241,9 @@ fi if [[ ${SHARED_FS_PATH} ]]; then TEST_SUITE_ARGS+=("--shared-fs-path" "${SHARED_FS_PATH}") fi +if [[ ${BOT_NODE_TYPE} ]]; then + TEST_SUITE_ARGS+=("--partition" "${BOT_NODE_TYPE}") +fi # [[ ! -z ${BUILD_LOGS_DIR} ]] && TEST_SUITE_ARGS+=("--build-logs-dir" "${BUILD_LOGS_DIR}") # [[ ! -z ${SHARED_FS_PATH} ]] && TEST_SUITE_ARGS+=("--shared-fs-path" "${SHARED_FS_PATH}") diff --git a/test_suite.sh b/test_suite.sh index b6fdf274..b03cd73a 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -13,6 +13,7 @@ display_help() { echo "usage: $0 [OPTIONS]" echo " -g | --generic - instructs script to test for generic architecture target" + echo " -p | --partition - the partition name on which to test (used by ReFrame to load the right config)" echo " -h | --help - display this usage information" echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy" echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy" @@ -26,6 +27,10 @@ while [[ $# -gt 0 ]]; do DETECTION_PARAMETERS="--generic" shift ;; + -p|--partition) + REFRAME_PARTITION_NAME="${2}" + shift 2 + ;; -h|--help) display_help # Call your function # no shifting needed here, we're done. @@ -153,13 +158,6 @@ export RFM_CHECK_SEARCH_PATH=$TESTSUITEPREFIX/eessi/testsuite/tests export RFM_CHECK_SEARCH_RECURSIVE=1 export RFM_PREFIX=$PWD/reframe_runs -# Get the correct partition name -REFRAME_PARTITION_NAME=${EESSI_SOFTWARE_SUBDIR//\//_} -if [ ! -z "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]; then - REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME}_${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//_} -fi -echo "Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME}" - # Set the reframe system name, including partition export RFM_SYSTEM="BotBuildTests:${REFRAME_PARTITION_NAME}" From b7676c6fe6ab73f14fa06330122bf75d2de4a72d Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 12 Nov 2025 13:43:27 +0100 Subject: [PATCH 2/5] Add fallback for backwards compatibility --- test_suite.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test_suite.sh b/test_suite.sh index b03cd73a..4dec4f8f 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -183,6 +183,22 @@ else fatal_error "Failed to run 'reframe --version'" fi +# Check if the partition specified by RFM_SYSTEM is in the config file +# Redirect to /dev/null because we don't want to print an ERROR, we want to try a fallback +reframe --show-config | grep -v "could not find a configuration entry for the requested system/partition combination" > /dev/null +if [[ $? -eq 1 ]]; then + # There was a match by grep, so we failed to find the system/partition combination + # Try the previous approach for backwards compatibility + # This fallback can be scrapped once all bots have adopted the new naming convention + # (i.e. using the node_type name from app.cfg) for ReFrame partitions + # Get the correct partition name + REFRAME_PARTITION_NAME=${EESSI_SOFTWARE_SUBDIR//\//_} + if [ ! -z "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]; then + REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME}_${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//_} + fi + echo "Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME}" +fi + # Get the subset of test names based on the test mapping and tags (e.g. CI, 1_node) module_list="module_files.list.txt" mapping_config="tests/eessi_test_mapping/software_to_tests.yml" From 68048c5b3c82c06d969b10a5a905af033002a9b9 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 12 Nov 2025 13:44:14 +0100 Subject: [PATCH 3/5] Log the config for this partition, it's nice to have in the logs --- test_suite.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test_suite.sh b/test_suite.sh index 4dec4f8f..eec19f91 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -199,6 +199,9 @@ if [[ $? -eq 1 ]]; then echo "Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME}" fi +# Log the config for this partition: +reframe --show-config + # Get the subset of test names based on the test mapping and tags (e.g. CI, 1_node) module_list="module_files.list.txt" mapping_config="tests/eessi_test_mapping/software_to_tests.yml" From 57f19a73f00cfe8e61020f4f6a7fc33872eb7a78 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 12 Nov 2025 13:46:22 +0100 Subject: [PATCH 4/5] Add clear logging message, indicating that this it's relying on the fallback --- test_suite.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_suite.sh b/test_suite.sh index eec19f91..e33fdfe6 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -192,6 +192,8 @@ if [[ $? -eq 1 ]]; then # This fallback can be scrapped once all bots have adopted the new naming convention # (i.e. using the node_type name from app.cfg) for ReFrame partitions # Get the correct partition name + echo "Falling back to old naming scheme for REFRAME_PARTITION_NAME." + echo "This naming scheme is deprecated, please update your partition names in the ReFrame config file." REFRAME_PARTITION_NAME=${EESSI_SOFTWARE_SUBDIR//\//_} if [ ! -z "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]; then REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME}_${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//_} From 25481734c0122d8a397729d62a508142bbe46412 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 12 Nov 2025 15:38:19 +0100 Subject: [PATCH 5/5] Reset RFM_SYSTEM if we need the fallback approach for the partition name --- test_suite.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test_suite.sh b/test_suite.sh index e33fdfe6..44f7062e 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -199,6 +199,7 @@ if [[ $? -eq 1 ]]; then REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME}_${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//_} fi echo "Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME}" + export RFM_SYSTEM="BotBuildTests:${REFRAME_PARTITION_NAME}" fi # Log the config for this partition: