-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_all_tests.sh
executable file
·41 lines (35 loc) · 1.04 KB
/
run_all_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
#!/bin/bash -e
integration=$1
file=$2
backend_compile=$3
target=$4
workflow_link=$5
api_key=$6
export IVY_KEY=$api_key
pip3 install -e ivy/
cd ivy-integration-tests
pip3 install -r requirements.txt
pip3 install color-operations
pip3 install onnx
if [ "$integration" = "transformers" ]; then
pip3 install tf_keras
pip3 install datasets
pip3 install transformers
fi
# runs the tests on the latest ivy commit
set +e
if [ "$backend_compile" = "T" ]; then
touch test_logs.txt
DEBUG=0 COLUMNS=200 pytest $integration/$file.py --backend-compile --source-to-source --target=$target -p no:warnings --tb=short --json-report --json-report-file=test_report.json
pytest_exit_code=$?
else
DEBUG=0 COLUMNS=200 pytest $integration/$file.py -p no:warnings --source-to-source --target=$target --tb=short --json-report --json-report-file=test_report.json
pytest_exit_code=$?
fi
set -e
if [ $pytest_exit_code -eq 0 ] || [ $pytest_exit_code -eq 1 ]; then
python report_file_to_txt.py --workflow-link $workflow_link
exit 0
else
exit 1
fi