Blame view

test/run 1.06 KB
2f52018c3   Simon Glass   test/run: Report ...
1
2
3
4
5
  #!/bin/bash
  
  run_test() {
  	$@
  	[ $? -ne 0 ] && result=$((result+1))
2f52018c3   Simon Glass   test/run: Report ...
6
  }
07f4eadc9   Simon Glass   test: Add a simpl...
7

73a01d90c   Simon Glass   test: Correct ope...
8
  result=0
029ab15a6   Simon Glass   test: Update 'mak...
9
  # Run all tests that the standard sandbox build can support
2f52018c3   Simon Glass   test/run: Report ...
10
  run_test ./test/py/test.py --bd sandbox --build
029ab15a6   Simon Glass   test: Update 'mak...
11
12
  
  # Run tests which require sandbox_spl
2f52018c3   Simon Glass   test/run: Report ...
13
14
  run_test ./test/py/test.py --bd sandbox_spl --build -k \
  		test/py/tests/test_ofplatdata.py
029ab15a6   Simon Glass   test: Update 'mak...
15
16
17
  
  # Run tests for the flat DT version of sandbox
  ./test/py/test.py --bd sandbox_flattree --build
2f52018c3   Simon Glass   test/run: Report ...
18

ed772fe79   Simon Glass   test: Set the DTC...
19
20
21
  DTC_DIR=build-sandbox_spl/scripts/dtc
  
  PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \
72d8172be   Simon Glass   test: Run binman ...
22
  	./tools/binman/binman -t
adb5b6161   Simon Glass   test: Run patman ...
23
  run_test ./tools/patman/patman --test
34ba7d777   Simon Glass   test: Run buildma...
24
  run_test ./tools/buildman/buildman -t
ed772fe79   Simon Glass   test: Set the DTC...
25
  PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test ./tools/dtoc/dtoc -t
72d8172be   Simon Glass   test: Run binman ...
26

30d704c64   Simon Glass   binman: Run code ...
27
28
29
30
  # This needs you to set up Python test coverage tools.
  # To enable Python test coverage on Debian-type distributions (e.g. Ubuntu):
  #   $ sudo apt-get install python-pip python-pytest
  #   $ sudo pip install coverage
ed772fe79   Simon Glass   test: Set the DTC...
31
  PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \
30d704c64   Simon Glass   binman: Run code ...
32
  	./tools/binman/binman -T
2f52018c3   Simon Glass   test/run: Report ...
33
34
35
36
37
38
  if [ $result == 0 ]; then
  	echo "Tests passed!"
  else
  	echo "Tests FAILED"
  	exit 1
  fi