diff options
author | Linus Nordberg <linus@nordu.net> | 2017-03-09 15:17:58 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-03-09 15:17:58 +0100 |
commit | 863ef44a16759501c7ce939e93bf2891a552b2e3 (patch) | |
tree | 0fc28971759e60a044425d6d3f45ccfb596ed2e0 /test/scripts/light-system-test-prepare.sh | |
parent | 221c6771035d7a3c1e0441a46248a44ca2e99077 (diff) | |
parent | a08cb72fa60bdb11873a2409c3b5aa8ff2b4667d (diff) |
Merge remote-tracking branch 'refs/remotes/map/refactor-tests'
Diffstat (limited to 'test/scripts/light-system-test-prepare.sh')
-rwxr-xr-x | test/scripts/light-system-test-prepare.sh | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/test/scripts/light-system-test-prepare.sh b/test/scripts/light-system-test-prepare.sh index 1f68ed1..9b500c9 100755 --- a/test/scripts/light-system-test-prepare.sh +++ b/test/scripts/light-system-test-prepare.sh @@ -41,39 +41,29 @@ createcert mkdir keys (cd keys ; ${top_srcdir}/tools/create-key.sh logkey) openssl pkcs8 -topk8 -nocrypt -in keys/logkey-private.pem -out keys/logkey-private.pkcs8 -mkdir mergedb -mkdir mergedb-secondary -touch mergedb-secondary/logorder -printf 0 > mergedb-secondary/verifiedsize + mkdir known_roots cp ${top_srcdir}/tools/testcerts/roots/* known_roots mkdir privatekeys -for node in ${NODES}; do \ +for node in ${NODES}; do (cd privatekeys ; ${top_srcdir}/tools/create-key.sh ${node}) mkdir -p nodes/${node}/log + mkdir -p machine/${node}/db + cp ${top_srcdir}/test/catlfish-test-local-${node}.cfg machine/${node}/ done -${top_srcdir}/tools/genconfig.sh ${top_srcdir}/test/catlfish-test.cfg.in privatekeys keys/logkey.pem httpsca/demoCA/cacert.pem ${top_srcdir}/test/logadminkey-private.pem catlfish-test-generated.cfg - -for machine in ${MACHINES}; do \ - mkdir -p machine/machine-${machine}/db - cp ${top_srcdir}/test/catlfish-test-local-${machine}.cfg machine/machine-${machine}/ - ${top_srcdir}/tools/getconfig.py --localconfig machine/machine-${machine}/catlfish-test-local-${machine}.cfg --dest machine/machine-${machine}/catlfish-test.cfg - ${top_srcdir}/tools/compileconfig.py --config machine/machine-${machine}/catlfish-test.cfg --localconfig machine/machine-${machine}/catlfish-test-local-${machine}.cfg - touch machine/machine-${machine}/db/index && touch machine/machine-${machine}/db/newentries +for node in ${MERGESECONDARYNODES}; do + nodename=$(echo ${node} | cut -f 1 -d ':') + printf 0 > machine/${nodename}/db/verifiedsize done -mkdir -p machine/merge -cp ${top_srcdir}/test/catlfish-test-local-merge.cfg machine/merge/ -${top_srcdir}/tools/getconfig.py --localconfig machine/merge/catlfish-test-local-merge.cfg --dest machine/merge/catlfish-test.cfg -${top_srcdir}/tools/compileconfig.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg -mkdir -p machine/merge-2 -cp ${top_srcdir}/test/catlfish-test-local-merge-2.cfg machine/merge-2/ -${top_srcdir}/tools/getconfig.py --localconfig machine/merge-2/catlfish-test-local-merge-2.cfg --dest machine/merge-2/catlfish-test.cfg -${top_srcdir}/tools/compileconfig.py --config machine/merge-2/catlfish-test.cfg --localconfig machine/merge-2/catlfish-test-local-merge-2.cfg -mkdir -p machine/signing -cp ${top_srcdir}/test/catlfish-test-local-signing.cfg machine/signing/ -${top_srcdir}/tools/getconfig.py --localconfig machine/signing/catlfish-test-local-signing.cfg --dest machine/signing/catlfish-test.cfg -${top_srcdir}/tools/compileconfig.py --config machine/signing/catlfish-test.cfg --localconfig machine/signing/catlfish-test-local-signing.cfg + + test -x ${SOFTHSM} && ${SOFTHSM} --init-token --slot=0 --label=mylabel --so-pin=ffff --pin=ffff || true test -x ${SOFTHSM} && ${SOFTHSM} --import keys/logkey-private.pkcs8 --slot 0 --label mylabel --pin ffff --id 00 || true + +${top_srcdir}/tools/genconfig.sh ${top_srcdir}/test/catlfish-test.cfg.in privatekeys keys/logkey.pem httpsca/demoCA/cacert.pem ${top_srcdir}/test/logadminkey-private.pem catlfish-test-generated.cfg + +${top_srcdir}/test/scripts/reload-config.sh + +cp machine/merge-1/catlfish-test-local-merge-1.cfg current-merge-localconfig.cfg |