diff options
-rwxr-xr-x | test-keygen.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test-keygen.sh b/test-keygen.sh index 0185e14..747685e 100755 --- a/test-keygen.sh +++ b/test-keygen.sh | |||
@@ -2,7 +2,16 @@ | |||
2 | out=TEST_CHILD.$(date +%s) | 2 | out=TEST_CHILD.$(date +%s) |
3 | log=${out}.log | 3 | log=${out}.log |
4 | [ ! -e "$out" ] || exit | 4 | [ ! -e "$out" ] || exit |
5 | exec >"$log" 2>&1 | 5 | exec 3>&1 >"$log" 2>&1 |
6 | apt-cache policy gnupg | 6 | apt-cache policy gnupg |
7 | ps -C gpg-agent | 7 | ps -C gpg-agent |
8 | sudo ${PARENT_ROOT:+"PARENT_ROOT=$PARENT_ROOT"} bash -c 'time bash -x ./src/keygen.sh "$1"' bash "$out" | 8 | sudo ${PARENT_ROOT:+"PARENT_ROOT=$PARENT_ROOT"} bash -c 'time bash -x ./src/keygen.sh "$1"' bash "$out" |
9 | r=$? | ||
10 | |||
11 | case $r in | ||
12 | 0) exit ;; | ||
13 | *) echo "FAILED! (r=$r)" >&2 | ||
14 | tail "$log" >&3 | ||
15 | exit $r | ||
16 | ;; | ||
17 | esac | ||