~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to dtc/tests/fdtdump-runtest.sh

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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