| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | cd $(dirname $0) |
| 6 | |
| 7 | testname=$(basename $0) |
| 8 | |
| 9 | . ../../common/config.sh |
| 10 | . ../../common/log.sh |
| 11 | |
| 12 | export HOME=/root # seems to be set to /home/travis, breaking some tests |
| 13 | |
| 14 | command="" |
| 15 | |
| 16 | case "$testname" in |
| 17 | *_bash) |
| 18 | log_start "$0" "propagation of environment variable FOO in command bash: $testname" |
| 19 | testname=$(echo "$testname" | sed -s 's/_bash$//') |
| 20 | command="-c bash" |
| 21 | echo testname: $testname |
| 22 | ;; |
| 23 | *) |
| 24 | log_start "$0" "propagation of environment variable FOO: $test" |
| 25 | ;; |
| 26 | esac |
| 27 | |
| 28 | save_config |
| 29 | |
| 30 | # restore the files on exit |
| 31 | trap 'log_status "$0" "FAILURE"; restore_config' 0 |
| 32 | |
| 33 | change_config |
| 34 | |
| 35 | "./$testname.exp" "$command" |
| 36 | |
| 37 | log_status "$0" "SUCCESS" |
| 38 | restore_config |
| 39 | trap '' 0 |
| 40 |