summaryrefslogtreecommitdiffhomepage
path: root/systemtest/mcc-execute.tests/exitcodes.exp
diff options
context:
space:
mode:
Diffstat (limited to 'systemtest/mcc-execute.tests/exitcodes.exp')
-rw-r--r--systemtest/mcc-execute.tests/exitcodes.exp18
1 files changed, 18 insertions, 0 deletions
diff --git a/systemtest/mcc-execute.tests/exitcodes.exp b/systemtest/mcc-execute.tests/exitcodes.exp
new file mode 100644
index 0000000..6e8b632
--- /dev/null
+++ b/systemtest/mcc-execute.tests/exitcodes.exp
@@ -0,0 +1,18 @@
+# https://www.embecosm.com/appnotes/ean8/ean8-howto-dejagnu-1.0.html
+
+spawn systemtest/mcc-execute.tests/test1
+
+expect eof
+
+lassign [wait] pid spawnid os_error_flag value
+
+if {$os_error_flag == 0} {
+ if {$value == 3} {
+ pass "exit status: $value"
+ } else {
+ fail "exit status: $value"
+ }
+} else {
+ fail "errno: $value"
+}
+