summaryrefslogtreecommitdiff
path: root/test-cli/test_main.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-07-07 14:23:25 +0200
committerHector Fernandez <hector@iatec.biz>2020-07-07 14:23:25 +0200
commita0b900477098a435b5e434512c491f6bf0365b80 (patch)
tree1e72a7aaa1022b156fa434db1a600e9d5b257a1d /test-cli/test_main.py
parent9f89f02e7d6e2a3208b0b85d2567ebffd2515e09 (diff)
downloadboard-a0b900477098a435b5e434512c491f6bf0365b80.zip
board-a0b900477098a435b5e434512c491f6bf0365b80.tar.gz
board-a0b900477098a435b5e434512c491f6bf0365b80.tar.bz2
Solved minor errors
Diffstat (limited to 'test-cli/test_main.py')
-rw-r--r--test-cli/test_main.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/test-cli/test_main.py b/test-cli/test_main.py
index 3da79f7..80dfbe2 100644
--- a/test-cli/test_main.py
+++ b/test-cli/test_main.py
@@ -107,7 +107,8 @@ def reboot_if_autotest():
# reset board if AUTOTEST is enabled
autotest = psdbObj.get_setup_variable("AUTOTEST_" + globalVar.station)
if int(autotest) == 1:
- os.system('reboot')
+ os.system("reboot")
+ exit(0)
def create_paramslist(params):
@@ -291,12 +292,7 @@ def main():
qr.closeQR()
# Change state to "FINISHED"
- if psdbObj.read_station_state(globalVar.station) == StationStates.STATION_ERROR.name:
- # Abort
- print(
- "Error: Wrong previous station state before changing to FINISHED state. STATION_ERROR state unexpected.")
- exit(0)
- psdbObj.change_station_state(globalVar.station, StationStates.FINISHED.name)
+ set_next_state(StationStates.FINISHED.name)
else:
psdbObj.update_taskctl_status(globalVar.taskid_ctl, "TASK_BOARD_FAIL")
loggerObj.getlogger().info("Station error: #Unable to complete extra tasks#")