summaryrefslogtreecommitdiff
path: root/tools/submitcert.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2016-07-08 13:21:31 +0200
committerMagnus Ahltorp <map@kth.se>2016-07-08 13:21:31 +0200
commited94e0682912a8ee16cb5a1427166c3e77b51b50 (patch)
tree2a9890acf1b0a6a37132fffc320aef108717d78c /tools/submitcert.py
parentd5f7e595959229f7e4dee42adc518e14d05fed48 (diff)
Fix bugs in old tests. Add tests for merge takeover.
submitcert.py was not exiting with error code when cert submission failed. compileconfig.py was generating duplicate node names when Erlang nodes have several servers
Diffstat (limited to 'tools/submitcert.py')
-rwxr-xr-xtools/submitcert.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/submitcert.py b/tools/submitcert.py
index 3b14912..66d5126 100755
--- a/tools/submitcert.py
+++ b/tools/submitcert.py
@@ -183,11 +183,15 @@ print ncerts, "certs"
certs = get_all_certificates(certfiles)
+errors = 0
+
(result, timing) = submitcert(certs.next())
if result != None:
nsubmitted += 1
(leafcert, issuer_key_hash, sct) = result
save_sct(sct, sth, leafcert, issuer_key_hash)
+else:
+ errors += 1
if args.pre_warm:
select.select([], [], [], 3.0)
@@ -206,6 +210,8 @@ try:
nsubmitted += 1
(leafcert, issuer_key_hash, sct) = result
save_sct(sct, sth, leafcert, issuer_key_hash)
+ else:
+ errors += 1
deltatime = datetime.datetime.now() - starttime
deltatime_f = deltatime.seconds + deltatime.microseconds / 1000000.0
rate = nsubmitted / deltatime_f
@@ -217,3 +223,7 @@ try:
except KeyboardInterrupt:
p.terminate()
p.join()
+
+if errors:
+ print >> sys.stderr, errors, "errors encountered, exiting with error code"
+ sys.exit(1)