|
1 | 1 | #!/usr/bin/env bash
|
| 2 | +check_logs() { |
| 3 | + if grep "AssertionError" $1; |
| 4 | + then |
| 5 | + echo "Integration tests:FAILED." |
| 6 | + exit 1 |
| 7 | + else |
| 8 | + echo "Integration tests: SUCCESS." |
| 9 | + fi |
| 10 | +} |
2 | 11 |
|
3 |
| -#export TORNASOLE_LOG_LEVEL=debug |
4 |
| -TORNASOLE_LOG_LEVEL=debug python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/report.html --self-contained-html tests/ |
5 |
| -TORNASOLE_LOG_LEVEL=debug python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/test_rules_tensorflow.html --self-contained-html -s tests/analysis/integration_testing_rules.py::test_test_rules --mode tensorflow --path_to_config ./tests/analysis/config.yaml |
6 |
| -TORNASOLE_LOG_LEVEL=debug python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/test_rules_mxnet.html --self-contained-html -s tests/analysis/integration_testing_rules.py::test_test_rules --mode mxnet --path_to_config ./tests/analysis/config.yaml |
7 |
| -TORNASOLE_LOG_LEVEL=debug python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/test_rules_pytorch.html --self-contained-html -s tests/analysis/integration_testing_rules.py::test_test_rules --mode pytorch --path_to_config ./tests/analysis/config.yaml |
| 12 | +set -ex |
| 13 | +export TORNASOLE_LOG_LEVEL=debug |
| 14 | +python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/report_analysis.html --self-contained-html tests/analysis |
| 15 | +python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/report_core.html --self-contained-html tests/core |
8 | 16 |
|
| 17 | +if [ "$run_pytest_tensorflow" = "enable" ] ; then |
| 18 | + python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/report_tensorflow.html --self-contained-html tests/tensorflow |
| 19 | + python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/test_rules_tensorflow.html --self-contained-html -s tests/analysis/integration_testing_rules.py::test_test_rules --mode tensorflow --path_to_config ./tests/analysis/config.yaml |
| 20 | +fi |
| 21 | + |
| 22 | +if [ "$run_pytest_mxnet" = "enable" ] ; then |
| 23 | + python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/report_mxnet.html --self-contained-html tests/mxnet |
| 24 | + python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/test_rules_mxnet.html --self-contained-html -s tests/analysis/integration_testing_rules.py::test_test_rules --mode mxnet --path_to_config ./tests/analysis/config.yaml |
| 25 | +fi |
| 26 | + |
| 27 | +if [ "$run_pytest_pytorch" = "enable" ] ; then |
| 28 | + python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/report_pytorch.html --self-contained-html tests/pytorch |
| 29 | + python -m pytest --html=upload/$CURRENT_COMMIT_PATH/reports/test_rules_pytorch.html --self-contained-html -s tests/analysis/integration_testing_rules.py::test_test_rules --mode pytorch --path_to_config ./tests/analysis/config.yaml |
| 30 | +fi |
| 31 | + |
| 32 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/report_analysis.html |
| 33 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/report_core.html |
| 34 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/report_tensorflow.html |
| 35 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/report_mxnet.html |
| 36 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/report_pytorch.html |
| 37 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/test_rules_tensorflow.html |
| 38 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/test_rules_mxnet.html |
| 39 | +check_logs upload/$CURRENT_COMMIT_PATH/reports/test_rules_pytorch.html |
0 commit comments