xref: /openbmc/u-boot/test/run (revision adb5b61612ca5a553b5b638e1173df4817b14f50)
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
22*adb5b616SSimon Glassrun_test ./tools/patman/patman --test
2372d8172bSSimon Glass
242f52018cSSimon Glassif [ $result == 0 ]; then
252f52018cSSimon Glass	echo "Tests passed!"
262f52018cSSimon Glasselse
272f52018cSSimon Glass	echo "Tests FAILED"
282f52018cSSimon Glass	exit 1
292f52018cSSimon Glassfi
30