diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2008-03-05 16:22:41 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@loeliger.com> | 2008-03-23 08:00:33 -0500 |
commit | 6c2e4d61f83af4233c3270e4f1ec1da01d90466e (patch) | |
tree | b0bd9eb7e136496cb1586c7f1cf0da8a202f659a /tests/dtc-fatal.sh | |
parent | 68fe10ba4efc86c4bd388f5ba68d1b3e2e9e3be2 (diff) | |
download | device-tree-compiler-6c2e4d61f83af4233c3270e4f1ec1da01d90466e.tar.gz |
dtc: Testcases for input handling
This patch adds some testcases checking corner cases of dtc's input
file handling. Specifically it checks that dtc works correctly when
given input via stdin, and it checks that dtc fails gracefully if
given a nonexistent input file (or directory, in the case of -Ifs
mode).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/dtc-fatal.sh')
-rw-r--r-- | tests/dtc-fatal.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/dtc-fatal.sh b/tests/dtc-fatal.sh new file mode 100644 index 0000000..8eb1b44 --- /dev/null +++ b/tests/dtc-fatal.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +. tests.sh + +verbose_run $VALGRIND "$DTC" -o/dev/null "$@" +ret="$?" + +if [ "$ret" -gt 127 ]; then + FAIL "dtc killed by signal (ret=$ret)" +elif [ "$ret" != "1" ]; then + FAIL "dtc returned incorrect status $ret instead of 1" +fi + +PASS |