forked from ray-project/xgboost_ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_ci_tests.sh
executable file
·44 lines (39 loc) · 1.38 KB
/
run_ci_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
TUNE=1
for i in "$@"
do
echo "$i"
case "$i" in
--no-tune)
TUNE=0
;;
*)
echo "unknown arg, $i"
exit 1
;;
esac
done
pushd xgboost_ray/tests || exit 1
echo "============="
echo "Running tests"
echo "============="
END_STATUS=0
if ! python -m pytest -vv -s --log-cli-level=DEBUG --durations=0 -x "test_colocation.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_matrix.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_data_source.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_xgboost_api.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_fault_tolerance.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_end_to_end.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_sklearn.py" ; then END_STATUS=1; fi
if ! python -m pytest -v --durations=0 -x "test_sklearn_matrix.py" ; then END_STATUS=1; fi
if [ "$TUNE" = "1" ]; then
if ! python -m pytest -v --durations=0 -x "test_tune.py" ; then END_STATUS=1; fi
else
echo "skipping tune tests"
fi
echo "running smoke test on benchmark_cpu_gpu.py" && if ! python release/benchmark_cpu_gpu.py 2 10 20 --smoke-test; then END_STATUS=1; fi
popd || exit 1
if [ "$END_STATUS" = "1" ]; then
echo "At least one test has failed, exiting with code 1"
fi
exit "$END_STATUS"