cmake: Add X11 include path for tools
[platform/upstream/dbus.git] / test / tap-test.sh.in
1 #!/bin/sh
2
3 # Wrapper to make an Automake-style test output TAP syntax:
4 #
5 # - arbitrary stdout/stderr is sent to stderr where it will not be
6 #   interpreted as TAP
7 # - it is treated as a single test-case
8 # - exit 77 is a skip
9 # - exit 0 is a pass
10 # - anything else is a failure
11 #
12 # Usage: use sed to replace @RUN@ with the shell command-line to be run.
13
14 set -e
15
16 # we plan to do 1 test-case
17 echo "1..1"
18
19 e=0
20 @RUN@ >&2 || e=$?
21
22 case "$e" in
23     (0)
24         echo "ok 1 @RUN@"
25         ;;
26     (77)
27         echo "ok 1 # SKIP @RUN@"
28         ;;
29     (*)
30         echo "not ok 1 @RUN@ (exit status $e)"
31         ;;
32 esac