File: dbus-test-runner

package info (click to toggle)
dbus 1.16.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,048 kB
  • sloc: ansic: 106,015; xml: 9,270; sh: 1,967; python: 242; makefile: 230; cpp: 27
file content (43 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh

set -e

dir="$1"
shift

if ! test -d "$dir"; then
  echo "Usage: dbus-test-runner directory [executable...]"
  exit 0
fi

passed=0
failed=0
skipped=0

for prog in "$@"; do
  e=0
  "$dir/$prog" || e=$?
  case $e in
    (0)
      echo "PASS: $prog"
      passed=`expr $passed + 1`
      ;;
    (77)
      echo "SKIP: $prog"
      skipped=`expr $skipped + 1`
      ;;
    (*)
      echo "FAIL: $prog"
      failed=`expr $failed + 1`
      ;;
  esac
done

if test $failed = 0; then
  # avoid saying "FAIL", to make it easy to grep results!
  echo "PASSED $passed / SKIPPED $skipped"
  exit 0
else
  echo "PASSED $passed / FAILED $failed / SKIPPED $skipped"
  exit 1
fi