summaryrefslogtreecommitdiff
path: root/test-keygen.sh
blob: abbe7027d28a6c8764d44bcf128c8cd38964b802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
(cd kiki && make install)
out=TEST_CHILD.$(date +%s)
log=${out}.log
[ ! -e "$out" ] || exit
exec 3>&1 >"$log" 2>&1
apt-cache policy gnupg
ps -C gpg-agent
sudo ${PARENT_ROOT:+"PARENT_ROOT=$PARENT_ROOT"} bash -c 'time bash -x ./src/keygen.sh "$1"' bash "$out"
r=$?

case $r in
  0) exit ;;
  *) echo "FAILED! (r=$r)" >&2
     printf 'Log in "%s" ends in:\n' "$log" >&3
     tail "$log" >&3
     exit $r
     ;;
esac