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 9 dts="$1" 10 dtb="${dts}.dtb" 11 out="${dts}.out" 12 LOG=tmp.log.$$ 13 14 files="$dtb $out $LOG" 15 16 rm -f $files 17 trap "rm -f $files" 0 18 19 verbose_run_log_check "$LOG" $VALGRIND $DTC -O dtb $dts -o $dtb 20 $FDTDUMP ${dtb} | grep -v "//" >${out} 21 22 if diff -w $dts $out >/dev/null; then 23 PASS 24 else 25 if [ -z "$QUIET_TEST" ]; then 26 echo "DIFF :-:" 27 diff -u -w $dts $out 28 fi 29 FAIL "Results differ from expected" 30 fi 31