summaryrefslogtreecommitdiff
path: root/test/tpm_test/trng_test.py
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2020-06-09 17:27:38 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-11 21:00:01 +0000
commit043326f2bb542cc3e9fa74364364f933141b294d (patch)
tree704049de54ad03d7d3ac2db428d1cbb36cd514e9 /test/tpm_test/trng_test.py
parente74d8b264cab776631991e16a6a447da0ce73561 (diff)
downloadchrome-ec-043326f2bb542cc3e9fa74364364f933141b294d.tar.gz
test/tpm_test: update for Python3
Due to Python3 switch tpm_test.py stop working. Updates to make it work with Python3. cros lint complains it can't import Crypto and rsa BUG=None TEST=tpmtest.py tpmtest.py -t To test exception handling change line 167 in crypto_test.py from if real_out_text != out_text: to if real_out_text == out_text: and run tpmtest.py again. Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I927b25ab3288274993949c53564bed73faa346e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2231974 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'test/tpm_test/trng_test.py')
-rw-r--r--test/tpm_test/trng_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tpm_test/trng_test.py b/test/tpm_test/trng_test.py
index ddfc659339..c4d9395e80 100644
--- a/test/tpm_test/trng_test.py
+++ b/test/tpm_test/trng_test.py
@@ -49,5 +49,5 @@ def trng_test(tpm):
raise subcmd.TpmTestError("Unexpected response to \'%s\': %s" %
('trng', utils.hex_dump(response)))
out_file.write(response[12:])
- print('%s %d%%\r' % (utils.cursor_back(), (block/10)), end='')
+ print('%s %d%%\r' % (utils.cursor_back(), (block//10)), end='')
print('%sSUCCESS: %s' % (utils.cursor_back(), 'trng'))