1313display_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
153158export RFM_CHECK_SEARCH_RECURSIVE=1
154159export 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
164162export RFM_SYSTEM=" BotBuildTests:${REFRAME_PARTITION_NAME} "
165163
@@ -185,6 +183,28 @@ else
185183 fatal_error " Failed to run 'reframe --version'"
186184fi
187185
186+ # Check if the partition specified by RFM_SYSTEM is in the config file
187+ # Redirect to /dev/null because we don't want to print an ERROR, we want to try a fallback
188+ reframe --show-config | grep -v " could not find a configuration entry for the requested system/partition combination" > /dev/null
189+ if [[ $? -eq 1 ]]; then
190+ # There was a match by grep, so we failed to find the system/partition combination
191+ # Try the previous approach for backwards compatibility
192+ # This fallback can be scrapped once all bots have adopted the new naming convention
193+ # (i.e. using the node_type name from app.cfg) for ReFrame partitions
194+ # Get the correct partition name
195+ echo " Falling back to old naming scheme for REFRAME_PARTITION_NAME."
196+ echo " This naming scheme is deprecated, please update your partition names in the ReFrame config file."
197+ REFRAME_PARTITION_NAME=${EESSI_SOFTWARE_SUBDIR// \/ / _}
198+ if [ ! -z " $EESSI_ACCELERATOR_TARGET_OVERRIDE " ]; then
199+ REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME} _${EESSI_ACCELERATOR_TARGET_OVERRIDE// \/ / _}
200+ fi
201+ echo " Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME} "
202+ export RFM_SYSTEM=" BotBuildTests:${REFRAME_PARTITION_NAME} "
203+ fi
204+
205+ # Log the config for this partition:
206+ reframe --show-config
207+
188208# Get the subset of test names based on the test mapping and tags (e.g. CI, 1_node)
189209module_list=" module_files.list.txt"
190210mapping_config=" tests/eessi_test_mapping/software_to_tests.yml"
0 commit comments