diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-13 11:27:39 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-13 11:27:39 +0100 |
commit | 97b8d5bb3c9fd96251e89539d122d2331a2a7925 (patch) | |
tree | d72aca2bb0a2ea3b7d5933c1c68097ed0840002a /systemtest | |
parent | 387af55e498970975d77291374e2f5be12a040bd (diff) |
Add system tests, implement syscall
Diffstat (limited to 'systemtest')
-rw-r--r-- | systemtest/config/unix.exp | 0 | ||||
-rw-r--r-- | systemtest/lib/mcc.exp | 0 | ||||
-rw-r--r-- | systemtest/mcc-compile.tests/compile.exp | 1 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/exitcodes.exp | 18 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/test.cpp | 1 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/test1.cpp | 1 |
6 files changed, 21 insertions, 0 deletions
diff --git a/systemtest/config/unix.exp b/systemtest/config/unix.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/systemtest/config/unix.exp diff --git a/systemtest/lib/mcc.exp b/systemtest/lib/mcc.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/systemtest/lib/mcc.exp diff --git a/systemtest/mcc-compile.tests/compile.exp b/systemtest/mcc-compile.tests/compile.exp new file mode 100644 index 0000000..7866d6f --- /dev/null +++ b/systemtest/mcc-compile.tests/compile.exp @@ -0,0 +1 @@ +# https://www.embecosm.com/appnotes/ean8/ean8-howto-dejagnu-1.0.html 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" +} + diff --git a/systemtest/mcc-execute.tests/test.cpp b/systemtest/mcc-execute.tests/test.cpp new file mode 100644 index 0000000..40cbb54 --- /dev/null +++ b/systemtest/mcc-execute.tests/test.cpp @@ -0,0 +1 @@ +int main() { return 1; } diff --git a/systemtest/mcc-execute.tests/test1.cpp b/systemtest/mcc-execute.tests/test1.cpp new file mode 100644 index 0000000..3a03f6f --- /dev/null +++ b/systemtest/mcc-execute.tests/test1.cpp @@ -0,0 +1 @@ +int main() { return 1 + 2; } |