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
7 changes: 7 additions & 0 deletions bot/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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}")

Expand Down
34 changes: 27 additions & 7 deletions test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down Expand Up @@ -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}"

Expand All @@ -185,6 +183,28 @@ 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
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//\//_}
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
Comment on lines +186 to +203
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this is all to keep backwards compatibility


# 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"
Expand Down