diff options
Diffstat (limited to 'test-cli')
-rw-r--r-- | test-cli/.idea/misc.xml | 2 | ||||
-rw-r--r-- | test-cli/.idea/test-cli.iml | 2 | ||||
-rw-r--r-- | test-cli/.idea/workspace.xml | 19 | ||||
-rw-r--r-- | test-cli/test/tests/qeeprom.py | 2 | ||||
-rw-r--r-- | test-cli/test/tests/qethernet.py | 20 | ||||
-rw-r--r-- | test-cli/test/tests/qram.py | 12 | ||||
-rw-r--r-- | test-cli/test_main.py | 2 |
7 files changed, 38 insertions, 21 deletions
diff --git a/test-cli/.idea/misc.xml b/test-cli/.idea/misc.xml index 2012045..3999087 100644 --- a/test-cli/.idea/misc.xml +++ b/test-cli/.idea/misc.xml @@ -3,5 +3,5 @@ <component name="JavaScriptSettings"> <option name="languageLevel" value="ES6" /> </component> - <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5" project-jdk-type="Python SDK" /> + <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" /> </project>
\ No newline at end of file diff --git a/test-cli/.idea/test-cli.iml b/test-cli/.idea/test-cli.iml index 8a05c6e..218fb9e 100644 --- a/test-cli/.idea/test-cli.iml +++ b/test-cli/.idea/test-cli.iml @@ -2,7 +2,7 @@ <module type="PYTHON_MODULE" version="4"> <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$" /> - <orderEntry type="inheritedJdk" /> + <orderEntry type="jdk" jdkName="Python 3.6" jdkType="Python SDK" /> <orderEntry type="sourceFolder" forTests="false" /> </component> <component name="PyDocumentationSettings"> diff --git a/test-cli/.idea/workspace.xml b/test-cli/.idea/workspace.xml index 25fe244..42f0f8f 100644 --- a/test-cli/.idea/workspace.xml +++ b/test-cli/.idea/workspace.xml @@ -2,8 +2,12 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="4991a6e0-1b9d-4824-9b6e-5ac031eb4816" name="Default Changelist" comment=""> - <change beforePath="$PROJECT_DIR$/test/helpers/get_dieid.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/helpers/get_dieid.py" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/test/helpers/testsrv_db.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/helpers/testsrv_db.py" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/test-cli.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/test-cli.iml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/test/tests/qeeprom.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/tests/qeeprom.py" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/test/tests/qethernet.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/tests/qethernet.py" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/test/tests/qram.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/tests/qram.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/test_main.py" beforeDir="false" afterPath="$PROJECT_DIR$/test_main.py" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> @@ -25,6 +29,7 @@ <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="WebServerToolWindowFactoryState" value="false" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" /> + <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" /> </component> <component name="SvnConfiguration"> <configuration /> @@ -43,4 +48,14 @@ <component name="TypeScriptGeneratedFilesManager"> <option name="version" value="1" /> </component> + <component name="WindowStateProjectService"> + <state x="482" y="187" key="SettingsEditor" timestamp="1583395937697"> + <screen x="67" y="27" width="1853" height="1053" /> + </state> + <state x="482" y="187" key="SettingsEditor/67.27.1853.1053@67.27.1853.1053" timestamp="1583395937697" /> + <state x="641" y="119" width="704" height="867" key="find.popup" timestamp="1583427991724"> + <screen x="67" y="27" width="1853" height="1053" /> + </state> + <state x="641" y="119" width="704" height="867" key="find.popup/67.27.1853.1053@67.27.1853.1053" timestamp="1583427991724" /> + </component> </project>
\ No newline at end of file diff --git a/test-cli/test/tests/qeeprom.py b/test-cli/test/tests/qeeprom.py index c2293c2..acdc1f6 100644 --- a/test-cli/test/tests/qeeprom.py +++ b/test-cli/test/tests/qeeprom.py @@ -27,7 +27,7 @@ class Qeeprom(unittest.TestCase): p = sh.dd(sh.echo(data_tx), "of=" + self.__eeprompath, "bs=1", "seek=" + self.__position) if p.exit_code == 0: # read data from the eeprom - p = sh.dd("if=" + self.__eeprompath, "bs=1", "skip=" + self.__position, "count=" + len(data_tx)) + p = sh.dd("if=" + self.__eeprompath, "bs=1", "skip=" + self.__position, "count=" + str(len(data_tx))) if p.exit_code == 0: data_rx = p.stdout.decode('ascii') # compare both values diff --git a/test-cli/test/tests/qethernet.py b/test-cli/test/tests/qethernet.py index 22d796c..adee67f 100644 --- a/test-cli/test/tests/qethernet.py +++ b/test-cli/test/tests/qethernet.py @@ -4,26 +4,26 @@ import re class Qethernet(unittest.TestCase): - __sip = None + __serverip = None __numbytestx = None __bind = None - __OKBW = None + __bwexpected = None __port = None def __init__(self, testname, testfunc, varlist): super(Qethernet, self).__init__(testfunc) - if "sip" in varlist: - self.__sip = varlist["sip"] + if "serverip" in varlist: + self.__serverip = varlist["serverip"] else: raise Exception('sip param inside Qethernet have been be defined') if "bind" in varlist: self.__bind = varlist["bind"] else: self.__bind = None - if "OKBW" in varlist: - self.__OKBW = varlist["OKBW"] + if "bwexpected" in varlist: + self.__bwexpected = varlist["bwexpected"] else: - raise Exception('OKBW param inside Qethernet must be defined') + raise Exception('bwexpected param inside Qethernet must be defined') if "port" in varlist: self.__port = varlist["port"] else: @@ -34,9 +34,9 @@ class Qethernet(unittest.TestCase): def execute(self): # execute iperf command against the server if self.__bind is None: - p = sh.iperf("-c", self.__sip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port) + p = sh.iperf("-c", self.__serverip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port) else: - p = sh.iperf("-c", self.__sip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port, "-B", + p = sh.iperf("-c", self.__serverip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port, "-B", self.__bind) # check if it was executed succesfully if p.exit_code == 0: @@ -53,7 +53,7 @@ class Qethernet(unittest.TestCase): bwreal = b[0] # check if BW is in the expected range - self.failUnless(float(bwreal) > float(self.__OKBW) * 0.9, + self.failUnless(float(bwreal) > float(self.__bwexpected) * 0.9, "failed: speed is lower than spected. Speed(MB/s)" + str(bwreal)) else: self.fail("failed: could not complete iperf command") diff --git a/test-cli/test/tests/qram.py b/test-cli/test/tests/qram.py index 1b66e5c..ade7aeb 100644 --- a/test-cli/test/tests/qram.py +++ b/test-cli/test/tests/qram.py @@ -3,17 +3,17 @@ import sh class Qram(unittest.TestCase): - __memSize = "10M" + __memsize = "10M" __loops = "1" - # varlist: memSize, loops + # varlist: memsize, loops def __init__(self, testname, testfunc, varlist): super(Qram, self).__init__(testfunc) - if "memSize" in varlist: - self.__memSize = varlist["memSize"] + if "memsize" in varlist: + self.__memsize = varlist["memsize"] else: - raise Exception('memSize param inside Qram must be defined') + raise Exception('memsize param inside Qram must be defined') if "loops" in varlist: self.__loops = varlist["loops"] else: @@ -22,6 +22,6 @@ class Qram(unittest.TestCase): def execute(self): try: - sh.memtester(self.__memSize, "1") + sh.memtester(self.__memsize, "1") except sh.ErrorReturnCode as e: self.fail("failed: could not complete memtester command") diff --git a/test-cli/test_main.py b/test-cli/test_main.py index 8648b6b..c09d703 100644 --- a/test-cli/test_main.py +++ b/test-cli/test_main.py @@ -63,6 +63,8 @@ def add_test_task(suite, testdefname, paramlist): suite.addTest(Qserial(testdefname, "execute", paramlist)) # elif testdefname == "HDMI": # suite.addTest(Qhdmi(testdefname, "execute", paramlist)) + # elif testdefname == "SCREEN": + # suite.addTest(Qscreen(testdefname, "execute", paramlist)) elif testdefname == "BUTTON": suite.addTest(Qbutton(testdefname, "execute", paramlist)) elif testdefname == "RTC": |