1#! /bin/sh 2 3# Arguments: 4# $1 - source file to compile and compare with fdtdump output of the 5# compiled file. 6 7. ./tests.sh 8 9dts="$1" 10dtb="${dts}.dtb" 11out="${dts}.out" 12LOG=tmp.log.$$ 13 14files="$dtb $out $LOG" 15 16rm -f $files 17trap "rm -f $files" 0 18 19verbose_run_log_check "$LOG" $VALGRIND $DTC -O dtb $dts -o $dtb 20$FDTDUMP ${dtb} | grep -v "//" >${out} 21 22if diff -w $dts $out >/dev/null; then 23 PASS 24else 25 if [ -z "$QUIET_TEST" ]; then 26 echo "DIFF :-:" 27 diff -u -w $dts $out 28 fi 29 FAIL "Results differ from expected" 30fi 31