tests: gadget0: allow specifying DUT on CLI

Easier than editing the file each time.
This commit is contained in:
Karl Palsson
2017-03-25 21:15:59 +00:00
parent 56bb7c295a
commit 16f3042fa8
2 changed files with 13 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import datetime
import usb.core
import usb.util as uu
import logging
import sys
import unittest
@@ -379,3 +380,10 @@ class TestUnaligned(unittest.TestCase):
def test_unaligned(self):
self.set_unaligned()
self.do_readwrite()
if __name__ == "__main__":
if len(sys.argv) > 1:
DUT_SERIAL = sys.argv.pop()
print("Running tests for DUT: ", DUT_SERIAL)
unittest.main()