Skip to content

Commit 74e9bfa

Browse files
author
Caspar van Leeuwen
committed
Infer the ReFrame partition name based on the node_type listed in the job's cfg
1 parent cf64753 commit 74e9bfa

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

bot/test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ EESSI_OS_TYPE=$(cfg_get_value "architecture" "os_type")
189189
export EESSI_OS_TYPE=${EESSI_OS_TYPE:-linux}
190190
echo "bot/test.sh: EESSI_OS_TYPE='${EESSI_OS_TYPE}'"
191191

192+
# Get node_type from .architecture.node_type in ${JOB_CFG_FILE}
193+
export BOT_NODE_TYPE=$(cfg_get_value "architecture" "node_type")
194+
echo "bot/test.sh: BOT_NODE_TYPE='${BOT_NODE_TYPE}"
195+
192196
# prepare arguments to eessi_container.sh common to build and tarball steps
193197
declare -a COMMON_ARGS=()
194198
COMMON_ARGS+=("--verbose")
@@ -237,6 +241,9 @@ fi
237241
if [[ ${SHARED_FS_PATH} ]]; then
238242
TEST_SUITE_ARGS+=("--shared-fs-path" "${SHARED_FS_PATH}")
239243
fi
244+
if [[ ${BOT_NODE_TYPE} ]]; then
245+
TEST_SUITE_ARGS+=("--partition" "${BOT_NODE_TYPE}")
246+
fi
240247
# [[ ! -z ${BUILD_LOGS_DIR} ]] && TEST_SUITE_ARGS+=("--build-logs-dir" "${BUILD_LOGS_DIR}")
241248
# [[ ! -z ${SHARED_FS_PATH} ]] && TEST_SUITE_ARGS+=("--shared-fs-path" "${SHARED_FS_PATH}")
242249

test_suite.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
display_help() {
1414
echo "usage: $0 [OPTIONS]"
1515
echo " -g | --generic - instructs script to test for generic architecture target"
16+
echo " -p | --partition - the partition name on which to test (used by ReFrame to load the right config)"
1617
echo " -h | --help - display this usage information"
1718
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
1819
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
@@ -26,6 +27,10 @@ while [[ $# -gt 0 ]]; do
2627
DETECTION_PARAMETERS="--generic"
2728
shift
2829
;;
30+
-p|--partition)
31+
REFRAME_PARTITION_NAME="${2}"
32+
shift 2
33+
;;
2934
-h|--help)
3035
display_help # Call your function
3136
# no shifting needed here, we're done.
@@ -153,13 +158,6 @@ export RFM_CHECK_SEARCH_PATH=$TESTSUITEPREFIX/eessi/testsuite/tests
153158
export RFM_CHECK_SEARCH_RECURSIVE=1
154159
export RFM_PREFIX=$PWD/reframe_runs
155160

156-
# Get the correct partition name
157-
REFRAME_PARTITION_NAME=${EESSI_SOFTWARE_SUBDIR//\//_}
158-
if [ ! -z "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]; then
159-
REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME}_${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//_}
160-
fi
161-
echo "Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME}"
162-
163161
# Set the reframe system name, including partition
164162
export RFM_SYSTEM="BotBuildTests:${REFRAME_PARTITION_NAME}"
165163

0 commit comments

Comments
 (0)