ipex-llm/python/llm/test/run-llm-check-function.sh
Jin Qiao 25b6402315
Add Windows GPU unit test (#11050)
* Add Windows GPU UT

* temporarily remove ut on arc

* retry

* retry

* retry

* fix

* retry

* retry

* fix

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* fix

* retry

* retry

* retry

* retry

* retry

* retry

* merge into single workflow

* retry inference test

* retry

* retrigger

* try to fix inference test

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* retry

* check lower_bound

* retry

* retry

* try example test

* try fix example test

* retry

* fix

* seperate function into shell script

* remove cygpath

* try remove all cygpath

* retry

* retry

* Revert "try remove all cygpath"

This reverts commit 7ceeff3e48f08429062ecef548c1a3ad3488756f.

* Revert "retry"

This reverts commit 40ea2457843bff6991b8db24316cde5de1d35418.

* Revert "retry"

This reverts commit 817d0db3e5aec3bd449d3deaf4fb01d3ecfdc8a3.

* enable ut

* fix

* retrigger

* retrigger

* update download url

* fix

* fix

* retry

* add comment

* fix
2024-05-28 13:29:47 +08:00

22 lines
871 B
Bash

#!/bin/bash
# wrapper for pytest command
# add this before `pytest ...` or `python -m pytest ...` to avoid unexpected exit code 127 caused by ipex on Windows
# ref: https://github.com/intel/intel-extension-for-pytorch/issues/634
pytest_check_error() {
result=$(eval "$@" || echo "FINISH PYTEST")
echo $result > pytest_check_error.log
cat pytest_check_error.log
failed_lines=$(cat pytest_check_error.log | { grep failed || true; })
if [[ $failed_lines != "" ]]; then
exit 1
fi
rm pytest_check_error.log
}
# wrapper for python command
# add this before `python ...` to avoid unexpected exit code 127 caused by ipex on Windows
# ref: https://github.com/intel/intel-extension-for-pytorch/issues/634
ipex_workaround_wrapper() {
eval "$@" || ( [[ $? == 127 && $RUNNER_OS == "Windows" ]] && echo "EXIT CODE 127 DETECTED ON WINDOWS, IGNORE." || exit 1)
}