From da6d8a9fd47ac045055580a1898b8fba37e7241b Mon Sep 17 00:00:00 2001 From: Enrico Pozzobon Date: Thu, 18 Jul 2019 11:43:54 +0200 Subject: [PATCH] trying to make test measurements more stable --- get_submissions.sh | 4 ++++ test.py | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/get_submissions.sh b/get_submissions.sh index d1619d6..be08cd7 100755 --- a/get_submissions.sh +++ b/get_submissions.sh @@ -5,3 +5,7 @@ cd all-lwc-submission-files wget https://csrc.nist.gov/CSRC/media/Projects/Lightweight-Cryptography/documents/round-1/submissions/all-lwc-submission-files.zip unzip all-lwc-submission-files.zip cd .. + +mkdir -p all-lwc-submission-files/aes-gcm/Implementations/crypto_aead/aesgcm128-128 +cp -r mbed_aes_gcm/ all-lwc-submission-files/aes-gcm/Implementations/crypto_aead/aesgcm128-128/ref + diff --git a/test.py b/test.py index fd89d59..4192ae2 100755 --- a/test.py +++ b/test.py @@ -139,7 +139,7 @@ def begin_measurement(): sal = saleae.Saleae() sal.set_active_channels([0, 1, 2, 3], []) sal.set_sample_rate(sal.get_all_sample_rates()[0]) - sal.set_capture_seconds(1000) + sal.set_capture_seconds(6000) sal.capture_start() time.sleep(1) if sal.is_processing_complete(): @@ -148,11 +148,14 @@ def begin_measurement(): def end_measurement(sal): import time + if sal.is_processing_complete(): + raise Exception("Capture finished before expected") time.sleep(1) sal.capture_stop(); + time.sleep(.1) for attempt in range(3): if not sal.is_processing_complete(): - print("waiting for capture to complete") + print("Waiting for capture to complete...") time.sleep(1) continue outfile = "measurement_%s.csv" % time.strftime("%Y%m%d-%H%M%S") -- libgit2 0.26.0