summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest71
1 files changed, 26 insertions, 45 deletions
diff --git a/test b/test
index 185d915..4af52c8 100755
--- a/test
+++ b/test
@@ -1,68 +1,49 @@
#!/bin/sh
# See LICENSE file for copyright and license details.
-if test $# = 0; then
- if "$0" fail for me; then
- printf 'Testing is broken!\n' >&2
- exit 2
- fi
- set +e
- "$0" $$
- r=$?
- rm -f -- .?-$$.tmp
- exit $r
-fi
+. tests/preamble
-
-set -e
-test $# = 1
-pid=$1
-a=.a-$pid.tmp
-b=.b-$pid.tmp
-PATH="$(dirname -- "$0")/testutil:$PATH"
-export PATH
-
-. tests/load-functions
-
-alias t=.
+t=.
# this is for test development; set to : to skip tests
# have already been written and passed, set to . otherwise
-
-if ! env | grep '^SUPPORTED_OSES=' >/dev/null; then
- printf '%s\n' \
- "The test's environment has not been set up;" \
- 'you should run the test via `make check`'
- exit 1
-fi
+# t is used to synchronous tests,
+# p is used for asynchronous tests, and use t to determine whether to run
+# If you want to force all tests to run synchronous, uncomment the next line
+#alias p=t
set -v
-(. tests/test-self-check) >/dev/null 2>/dev/null
t tests/enums
. tests/load-types
-t tests/errors
-t tests/syscall-ranges
-t tests/syscall-errors
-t tests/signals
-t tests/split-register-classes
+p tests/errors
+p tests/syscall-ranges
+p tests/syscall-errors
+p tests/signals
+p tests/split-register-classes
+p tests/signness
+p tests/endians
+p tests/sections
+await
. tests/load-archinfo
t tests/archinfo
-t tests/fundamental-primitives
-t tests/is-struct
-t tests/array-types
-t tests/fixed-array-types
-t tests/split-register-types
-t tests/os-dependent-primitives
-t tests/os-dependent-arrays
-t tests/os-dependent-integers
-
+p tests/fundamental-primitives
+p tests/is-struct
+p tests/array-types
+p tests/fixed-array-types
+p tests/split-register-types
+p tests/os-dependent-primitives
+p tests/os-dependent-arrays
+p tests/os-dependent-integers
+await
+# TODO test libsyscalls_get_struct_description
+# TODO test libsyscalls_get_struct_display_info
# TODO test libsyscalls_get_syscall
# TODO test libsyscalls_get_syscall_display_info