Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pytest command to capture results to file #932

Merged
merged 1 commit into from
Nov 25, 2024
Merged
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
19 changes: 9 additions & 10 deletions tests/e2e/vLLM/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,23 @@ MODEL_CONFIGS="$PWD/tests/e2e/vLLM/configs"
for MODEL_CONFIG in "$MODEL_CONFIGS"/*
do
LOCAL_SUCCESS=0

echo "=== RUNNING MODEL: $MODEL_CONFIG ==="

export TEST_DATA_FILE=${MODEL_CONFIG}
pytest -s $PWD/tests/e2e/vLLM/test_vllm.py || LOCAL_SUCCESS=$?
export TEST_DATA_FILE="$MODEL_CONFIG"
pytest \
--capture=tee-sys \
--junitxml="test-results/e2e-$(date +%s).xml" \
"$PWD/tests/e2e/vLLM/test_vllm.py" || LOCAL_SUCCESS=$?

if [[ $LOCAL_SUCCESS == 0 ]]; then
echo "=== PASSED MODEL: ${MODEL_CONFIG} ==="
echo "=== PASSED MODEL: $MODEL_CONFIG ==="
else
echo "=== FAILED MODEL: ${MODEL_CONFIG} ==="
echo "=== FAILED MODEL: $MODEL_CONFIG ==="
fi

SUCCESS=$((SUCCESS + LOCAL_SUCCESS))

done

if [ "${SUCCESS}" -eq "0" ]; then
exit 0
else
exit 1
fi
exit "$SUCCESS"
Loading