aboutsummaryrefslogtreecommitdiff
path: root/unit-tests.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-03-04 14:39:13 -0500
committerRob Austein <sra@hactrn.net>2017-03-04 14:39:13 -0500
commit89e84c71f760203a350dd51cad100c425dc3a1c3 (patch)
treeb6b61689a6cd68e7a0aad909ab69fdac7fd0cafa /unit-tests.py
parent533b1b57b20671fa035029c4eb70b6673db4e2eb (diff)
Add --io-log option to unit-tests.py.
Diffstat (limited to 'unit-tests.py')
-rw-r--r--unit-tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/unit-tests.py b/unit-tests.py
index c1d0d44..e8743ed 100644
--- a/unit-tests.py
+++ b/unit-tests.py
@@ -83,6 +83,7 @@ def parse_arguments(argv = ()):
parser = ArgumentParser(description = __doc__, formatter_class = ArgumentDefaultsHelpFormatter)
parser.add_argument("--quiet", action = "store_true", help = "suppress chatter")
parser.add_argument("--debug", action = "store_true", help = "debug-level logging")
+ parser.add_argument("--io-log", action = "store_true", help = "log HSM I/O stream")
parser.add_argument("--wheel-pin", default = "fnord", help = "PIN for wheel user")
parser.add_argument("--so-pin", default = "fnord", help = "PIN for security officer")
parser.add_argument("--user-pin", default = "fnord", help = "PIN for normal user")
@@ -99,6 +100,7 @@ pin_map = { HAL_USER_NORMAL : "user_pin", HAL_USER_SO : "so_pin", HAL_USER_WHEEL
def setUpModule():
global hsm
hsm = HSM()
+ hsm.debug_io = args.io_log
def tearDownModule():
hsm.logout()