]>
Commit | Line | Data |
---|---|---|
2f52018c SG |
1 | #!/bin/bash |
2 | ||
3 | run_test() { | |
4 | $@ | |
5 | [ $? -ne 0 ] && result=$((result+1)) | |
2f52018c | 6 | } |
07f4eadc | 7 | |
73a01d90 SG |
8 | result=0 |
9 | ||
029ab15a | 10 | # Run all tests that the standard sandbox build can support |
2f52018c | 11 | run_test ./test/py/test.py --bd sandbox --build |
029ab15a SG |
12 | |
13 | # Run tests which require sandbox_spl | |
bf6226c3 | 14 | run_test ./test/py/test.py --bd sandbox_spl --build -k test_ofplatdata.py |
029ab15a SG |
15 | |
16 | # Run tests for the flat DT version of sandbox | |
17 | ./test/py/test.py --bd sandbox_flattree --build | |
2f52018c | 18 | |
ed772fe7 SG |
19 | DTC_DIR=build-sandbox_spl/scripts/dtc |
20 | ||
21 | PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \ | |
72d8172b | 22 | ./tools/binman/binman -t |
adb5b616 | 23 | run_test ./tools/patman/patman --test |
34ba7d77 | 24 | run_test ./tools/buildman/buildman -t |
ed772fe7 | 25 | PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test ./tools/dtoc/dtoc -t |
72d8172b | 26 | |
30d704c6 SG |
27 | # This needs you to set up Python test coverage tools. |
28 | # To enable Python test coverage on Debian-type distributions (e.g. Ubuntu): | |
16d836cd | 29 | # $ sudo apt-get install python-pytest python-coverage |
ed772fe7 | 30 | PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \ |
30d704c6 | 31 | ./tools/binman/binman -T |
ef6f77a8 SG |
32 | PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \ |
33 | ./tools/dtoc/dtoc -T | |
34 | PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \ | |
35 | ./tools/dtoc/test_fdt -T | |
30d704c6 | 36 | |
2f52018c SG |
37 | if [ $result == 0 ]; then |
38 | echo "Tests passed!" | |
39 | else | |
40 | echo "Tests FAILED" | |
41 | exit 1 | |
42 | fi |