From 2103de01e1899684f7200ed140c75acffdad9c70 Mon Sep 17 00:00:00 2001 From: ChaYoung You Date: Mon, 25 Aug 2014 16:22:38 +0900 Subject: [PATCH] Check the exit code --- standard/exitcode.exitcode | 1 + standard/exitcode.out | 0 test.sh | 8 +++++++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 standard/exitcode.exitcode create mode 100644 standard/exitcode.out diff --git a/standard/exitcode.exitcode b/standard/exitcode.exitcode new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/standard/exitcode.exitcode @@ -0,0 +1 @@ +2 diff --git a/standard/exitcode.out b/standard/exitcode.out new file mode 100644 index 0000000..e69de29 diff --git a/test.sh b/test.sh index 911fc00..cfe1768 100755 --- a/test.sh +++ b/test.sh @@ -25,8 +25,14 @@ for d in $ds; do else out=`$AHEUI $f` fi + exitcode=$? + if [ -e "$d/$fbase".exitcode ]; then + exitcodedata=`cat "$d/$fbase".exitcode` + else + exitcodedata=0 + fi outdata=`cat "$d/$fbase".out` - if [ "$out" == "$outdata" ]; then + if [ "$out" == "$outdata" -a "$exitcode" == "$exitcodedata" ]; then success=$(($success + 1)) echo "success!" else