Skip to content

Commit

Permalink
Update run-tests.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkuligowski authored Nov 25, 2024
1 parent 19a8fc5 commit ea3b306
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .jenkins/lm-eval-harness/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ usage() {

SUCCESS=0

while getopts "c:t:j:" OPT; do
while getopts "c:t:" OPT; do
case ${OPT} in
c )
CONFIG="$OPTARG"
Expand All @@ -30,7 +30,7 @@ while getopts "c:t:j:" OPT; do
done

# Parse list of configs.
IFS=$'\n' read -d '' -r -a MODEL_CONFIGS < $CONFIG
IFS=$'\n' read -d '' -r -a MODEL_CONFIGS < "$CONFIG"

for MODEL_CONFIG in "${MODEL_CONFIGS[@]}"
do
Expand All @@ -46,11 +46,11 @@ do
JUNIT_SUFFIX=""
if [[ -n "$TEST_RESULTS_DIR" ]]; then
LOG_DIR=$TEST_RESULTS_DIR
LOG_FILENAME="$test_${MODEL_CONFIG}_${RANDOM_SUFFIX}.xml"
LOG_FILENAME="test_${MODEL_CONFIG}_${RANDOM_SUFFIX}.xml"
LOG_PATH="${LOG_DIR}/${LOG_FILENAME}"
JUNIT_SUFFIX="-o junit_family=xunit1 --junitxml=${LOG_PATH}"
fi
pytest -s test_lm_eval_correctness.py $JUNIT_SUFFIX || LOCAL_SUCCESS=$?
pytest -s test_lm_eval_correctness.py "$JUNIT_SUFFIX" || LOCAL_SUCCESS=$?

if [[ $LOCAL_SUCCESS == 0 ]]; then
echo "=== PASSED MODEL: ${MODEL_CONFIG} ==="
Expand Down

0 comments on commit ea3b306

Please sign in to comment.