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