Adding logs to setup and teardown to better debug cleanup issues
Change-Id: I4972fd0057c125f63790a40aa7117db06912ed16
diff --git a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
index db6f8a4..ca476db 100755
--- a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
@@ -85,6 +85,7 @@
*** Keywords ***
Setup Suite
[Documentation] Set up the test suite
+ Start Logging Setup or Teardown Setup-${SUITE NAME}
${LogInfo}= Catenate
... \r\nPassed arguments:
... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup},
@@ -92,11 +93,14 @@
Common Test Suite Setup
# delete etcd MIB Template Data
Delete MIB Template Data ${INFRA_NAMESPACE}
+ 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
@@ -104,6 +108,8 @@
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM
# delete etcd MIB Template Data (for repeating test)
Delete MIB Template Data ${INFRA_NAMESPACE}
+ Run Keyword If ${logging} Collect Logs
+ Stop Logging Setup or Teardown Teardown-${SUITE NAME}
Close All ONOS SSH Connections
Perform ONU MIB Template Data Test