12f52018cSSimon Glass#!/bin/bash 22f52018cSSimon Glass 32f52018cSSimon Glassrun_test() { 42f52018cSSimon Glass $@ 52f52018cSSimon Glass [ $? -ne 0 ] && result=$((result+1)) 62f52018cSSimon Glass} 707f4eadcSSimon Glass 873a01d90SSimon Glassresult=0 973a01d90SSimon Glass 10029ab15aSSimon Glass# Run all tests that the standard sandbox build can support 112f52018cSSimon Glassrun_test ./test/py/test.py --bd sandbox --build 12029ab15aSSimon Glass 13029ab15aSSimon Glass# Run tests which require sandbox_spl 142f52018cSSimon Glassrun_test ./test/py/test.py --bd sandbox_spl --build -k \ 152f52018cSSimon Glass test/py/tests/test_ofplatdata.py 16029ab15aSSimon Glass 17029ab15aSSimon Glass# Run tests for the flat DT version of sandbox 18029ab15aSSimon Glass./test/py/test.py --bd sandbox_flattree --build 192f52018cSSimon Glass 2072d8172bSSimon GlassPYTHONPATH=build-sandbox_spl/scripts/dtc/pylibfdt run_test \ 2172d8172bSSimon Glass ./tools/binman/binman -t 22adb5b616SSimon Glassrun_test ./tools/patman/patman --test 2334ba7d77SSimon Glassrun_test ./tools/buildman/buildman -t 2400f6c800SSimon GlassPYTHONPATH=build-sandbox_spl/scripts/dtc/pylibfdt run_test ./tools/dtoc/dtoc -t 2572d8172bSSimon Glass 26*30d704c6SSimon Glass# This needs you to set up Python test coverage tools. 27*30d704c6SSimon Glass# To enable Python test coverage on Debian-type distributions (e.g. Ubuntu): 28*30d704c6SSimon Glass# $ sudo apt-get install python-pip python-pytest 29*30d704c6SSimon Glass# $ sudo pip install coverage 30*30d704c6SSimon GlassPYTHONPATH=build-sandbox_spl/scripts/dtc/pylibfdt run_test \ 31*30d704c6SSimon Glass ./tools/binman/binman -T 32*30d704c6SSimon Glass 332f52018cSSimon Glassif [ $result == 0 ]; then 342f52018cSSimon Glass echo "Tests passed!" 352f52018cSSimon Glasselse 362f52018cSSimon Glass echo "Tests FAILED" 372f52018cSSimon Glass exit 1 382f52018cSSimon Glassfi 39