Commit | Line | Data |
---|---|---|
69ab55f7 MW |
1 | #! /bin/sh |
2 | ||
3 | set -ex | |
4 | dirs="state archive req cert" | |
5 | rm -rf $dirs tmp | |
6 | mkdir -m775 tmp | |
7 | export CA_FAKE_TIME | |
8 | ||
9 | donep=t stage=0 | |
10 | while :; do | |
11 | stage=$(( $stage + 1 )) | |
12 | if [ -e test/stage-$stage.tar.gz ]; then continue; fi | |
13 | case $donep,$stage in | |
14 | t,1) ;; | |
15 | t,*) tar xf test/stage-$(( $stage - 1 )).tar.gz ;; | |
16 | esac | |
17 | donep=nil | |
18 | case $stage in | |
19 | 1) | |
20 | CA_FAKE_TIME="2011-08-23 18:32:45" | |
21 | bin/setup | |
22 | for i in $(seq 1 50); do | |
23 | bin/add tls-client fake#$i test/fake-reqs/$i.req | |
24 | done | |
25 | bin/check | |
26 | ;; | |
27 | 2) | |
28 | CA_FAKE_TIME="2011-08-24 18:32:45" | |
29 | bin/update | |
30 | bin/check | |
31 | ;; | |
32 | 3) | |
33 | CA_FAKE_TIME="2011-08-30 18:32:45" | |
34 | bin/update | |
35 | bin/check | |
36 | ;; | |
37 | 4) | |
38 | CA_FAKE_TIME="2011-09-03 18:32:45" | |
39 | bin/update | |
40 | bin/revoke fake#13 key-compromise | |
41 | bin/check | |
42 | ;; | |
43 | 5) | |
44 | CA_FAKE_TIME="2011-09-05 18:32:45" | |
45 | bin/update | |
46 | bin/check | |
47 | ;; | |
48 | *) | |
49 | break | |
50 | ;; | |
51 | esac | |
52 | tar cfz test/stage-$stage.tar.gz $dirs | |
53 | done |