File: runtests.sh

package info (click to toggle)
dbconfig-common 2.0.25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,184 kB
  • sloc: sh: 1,487; makefile: 51; sql: 40; perl: 12
file content (33 lines) | stat: -rwxr-xr-x 742 bytes parent folder | download | duplicates (4)
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
#! /bin/sh

set -e

cd "$(dirname $0)"

if [ -n "$*" ]; then
  tests=$(ls -1r "$@")
else
  tests=$(ls -1r *-tests.sh)
fi

for t in $tests; do
    printf "# # #\n# # # Test: $t\n# # #\n"
    printf "# #\n# # Shell: bash\n# #\n"
    rm /bin/sh && ln -s bash /bin/sh
    sh $t
    printf "\n# #\n# # Shell: dash\n# #\n"
    rm /bin/sh && ln -s dash /bin/sh
    sh $t
    printf "# #\n# # Shell: lksh\n# #\n"
    rm /bin/sh && ln -s lksh /bin/sh
    sh $t
#    printf "# #\n# # Shell: posh\n# #\n"
#    rm /bin/sh && ln -s posh /bin/sh
#    posh $t
    rm /bin/sh && ln -s zsh /bin/sh
    printf "\n# #\n# # Shell: zsh\n# #\n"
    env SHUNIT_PARENT=$t zsh -y +o function_argzero $t
done

# Restore Debian default
rm /bin/sh && ln -s dash /bin/sh