Adding logs to setup and teardown to better debug cleanup issues
Change-Id: I4972fd0057c125f63790a40aa7117db06912ed16
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 8001c96..f9d4a21 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -183,6 +183,7 @@
*** Keywords ***
Setup Suite
[Documentation] Set up the test suite
+ Start Logging Setup or Teardown Setup-${SUITE NAME}
${LogInfo}= Catenate
... \r\nPassed arguments:
... state2test:${state2test}, testmode:${testmode}, techprofile:${techprofile},
@@ -216,11 +217,14 @@
Delete MIB Template Data ${INFRA_NAMESPACE}
# delete etcd onu data
Delete ONU Go Adapter ETCD Data namespace=${INFRA_NAMESPACE} validate=True
+ Run Keyword If ${logging} Collect Logs
+ Stop Logging Setup or Teardown Setup-${SUITE NAME}
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.
... Cleans up and checks all ONU ports disabled in ONOS.
... Furthermore gives the possibility to pause the execution.
+ Start Logging Setup or Teardown Teardown-${SUITE NAME}
Run Keyword If ${pausebeforecleanup} Import Library Dialogs
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
@@ -228,6 +232,8 @@
Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix}
... without_pm_data=False
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
+ Run Keyword If ${logging} Collect Logs
+ Stop Logging Setup or Teardown Teardown-${SUITE NAME}
Close All ONOS SSH Connections
Remove Tech Profile ${INFRA_NAMESPACE}