Skip to content

Commit b7676c6

Browse files
author
Caspar van Leeuwen
committed
Add fallback for backwards compatibility
1 parent 74e9bfa commit b7676c6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test_suite.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,22 @@ else
183183
fatal_error "Failed to run 'reframe --version'"
184184
fi
185185

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+
REFRAME_PARTITION_NAME=${EESSI_SOFTWARE_SUBDIR//\//_}
196+
if [ ! -z "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]; then
197+
REFRAME_PARTITION_NAME=${REFRAME_PARTITION_NAME}_${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//_}
198+
fi
199+
echo "Constructed partition name based on EESSI_SOFTWARE_SUBDIR and EESSI_ACCELERATOR_TARGET: ${REFRAME_PARTITION_NAME}"
200+
fi
201+
186202
# Get the subset of test names based on the test mapping and tags (e.g. CI, 1_node)
187203
module_list="module_files.list.txt"
188204
mapping_config="tests/eessi_test_mapping/software_to_tests.yml"

0 commit comments

Comments
 (0)