[VOL-4395] (Part of) Added support to enable/disable per-test voltha logging in bbsim based periodic job
Change-Id: I1fafbe7812d45ff38d0b8bcaee11a41a76b8994d
diff --git a/Makefile b/Makefile
index b1bdb69..7ffca2b 100755
--- a/Makefile
+++ b/Makefile
@@ -143,14 +143,14 @@
# target to invoke openonu go adapter
openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v logging:True -i sanityOnuGo -i functionalOnuGo
+openonu-go-adapter-test: ROBOT_MISC_ARGS += -i sanityOnuGo -i functionalOnuGo
openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo $(ROBOT_DEBUG_LOG_OPT)
openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
openonu-go-adapter-test: openonu-go-adapter-tests
# target to invoke test with openonu go adapter applying MIB-Upload-Templating
-mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v logging:True -i functionalOnuGo
+mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i functionalOnuGo
mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
mib-upload-templating-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_MULT_PON_FILE)
mib-upload-templating-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUTemplateTests.robot
@@ -164,7 +164,7 @@
# target to invoke openonu go adapter failed state test at single ONU with OMCI hardening
# test should show in case of too small omci_response_rate (<=7) in BBSIM that OMCI hardening does not work
# test is PASS when ONU does not leave state 'starting-openomci'
-openonu-go-adapter-omci-hardening-failed-test: ROBOT_MISC_ARGS += -v logging:True -v timeout:300s -i NegativeStateTestOnuGo
+openonu-go-adapter-omci-hardening-failed-test: ROBOT_MISC_ARGS += -v timeout:300s -i NegativeStateTestOnuGo
openonu-go-adapter-omci-hardening-failed-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
openonu-go-adapter-omci-hardening-failed-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
openonu-go-adapter-omci-hardening-failed-test: ROBOT_FILE := Voltha_ONUNegativeStateTests.robot
@@ -207,7 +207,7 @@
reconcile-openonu-go-adapter-tests-tt: reconcile-openonu-go-adapter-tests
# target to invoke reconcile tests with openonu go adapter at single ONU resp. multiple OLTs
-reconcile-openonu-go-adapter-tests: ROBOT_MISC_ARGS += -v logging:True -i functionalOnuGo
+reconcile-openonu-go-adapter-tests: ROBOT_MISC_ARGS += -i functionalOnuGo
reconcile-openonu-go-adapter-tests: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
reconcile-openonu-go-adapter-tests: ROBOT_FILE := Voltha_ONUReconcileTests.robot
reconcile-openonu-go-adapter-tests: openonu-go-adapter-tests
@@ -226,7 +226,7 @@
# target to invoke test with openonu go adapter (applying 1T1GEM tech-profile) with multiple OLTs scenarios with ATT workflow
openonu-go-adapter-multi-olt-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
-openonu-go-adapter-multi-olt-test: ROBOT_MISC_ARGS += -v logging:True -i sanityOnuGo -i functionalOnuGo
+openonu-go-adapter-multi-olt-test: ROBOT_MISC_ARGS += -i sanityOnuGo -i functionalOnuGo
openonu-go-adapter-multi-olt-test: ROBOT_MISC_ARGS += -e notreadyOnuGo $(ROBOT_DEBUG_LOG_OPT)
openonu-go-adapter-multi-olt-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_MULTIPLE_OLT_FILE)
openonu-go-adapter-multi-olt-test: ROBOT_FILE := Voltha_ONUStateTests.robot
@@ -236,15 +236,15 @@
sanity-single-kind: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
sanity-single-kind: bbsim-kind
-sanity-bbsim-att: ROBOT_MISC_ARGS += -v logging:True -v workflow:ATT
+sanity-bbsim-att: ROBOT_MISC_ARGS += -v workflow:ATT
sanity-bbsim-att: sanity-bbsim
-sanity-bbsim-dt: ROBOT_MISC_ARGS += -v logging:True -v workflow:DT
+sanity-bbsim-dt: ROBOT_MISC_ARGS += -v workflow:DT
sanity-bbsim-dt: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_DT_SINGLE_PON_FILE)
sanity-bbsim-dt: ROBOT_FILE := Voltha_BBSimTests.robot
sanity-bbsim-dt: voltha-bbsim-test
-sanity-bbsim-tt: ROBOT_MISC_ARGS += -v logging:True -v workflow:TT
+sanity-bbsim-tt: ROBOT_MISC_ARGS += -v workflow:TT
sanity-bbsim-tt: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_TT_SINGLE_PON_FILE)
sanity-bbsim-tt: ROBOT_FILE := Voltha_BBSimTests.robot
sanity-bbsim-tt: voltha-bbsim-test
@@ -402,32 +402,32 @@
robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
# target to invoke single ONU pm data scenarios in ATT workflow
-voltha-pm-data-single-kind-att: ROBOT_MISC_ARGS += -v workflow:ATT -v logging:True
+voltha-pm-data-single-kind-att: ROBOT_MISC_ARGS += -v workflow:ATT
voltha-pm-data-single-kind-att: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
voltha-pm-data-single-kind-att: voltha-pm-data-tests
# target to invoke single ONU pm data scenarios in DT workflow
-voltha-pm-data-single-kind-dt: ROBOT_MISC_ARGS += -v workflow:DT -v logging:True
+voltha-pm-data-single-kind-dt: ROBOT_MISC_ARGS += -v workflow:DT
voltha-pm-data-single-kind-dt: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_DT_SINGLE_PON_FILE)
voltha-pm-data-single-kind-dt: voltha-pm-data-tests
# target to invoke single ONU pm data scenarios in TT workflow
-voltha-pm-data-single-kind-tt: ROBOT_MISC_ARGS += -v workflow:TT -v logging:True
+voltha-pm-data-single-kind-tt: ROBOT_MISC_ARGS += -v workflow:TT
voltha-pm-data-single-kind-tt: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_TT_SINGLE_PON_FILE)
voltha-pm-data-single-kind-tt: voltha-pm-data-tests
# target to invoke multiple OLTs pm data scenarios in ATT workflow
-voltha-pm-data-multiolt-kind-att: ROBOT_MISC_ARGS += -v workflow:ATT -v logging:True
+voltha-pm-data-multiolt-kind-att: ROBOT_MISC_ARGS += -v workflow:ATT
voltha-pm-data-multiolt-kind-att: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_MULTIPLE_OLT_FILE)
voltha-pm-data-multiolt-kind-att: voltha-pm-data-tests
# target to invoke multiple OLTs pm data scenarios in DT workflow
-voltha-pm-data-multiolt-kind-dt: ROBOT_MISC_ARGS += -v workflow:DT -v logging:True
+voltha-pm-data-multiolt-kind-dt: ROBOT_MISC_ARGS += -v workflow:DT
voltha-pm-data-multiolt-kind-dt: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_DT_MULTIPLE_OLT_FILE)
voltha-pm-data-multiolt-kind-dt: voltha-pm-data-tests
# target to invoke multiple OLTs pm data scenarios in TT workflow
-voltha-pm-data-multiolt-kind-tt: ROBOT_MISC_ARGS += -v workflow:TT -v logging:True
+voltha-pm-data-multiolt-kind-tt: ROBOT_MISC_ARGS += -v workflow:TT
voltha-pm-data-multiolt-kind-tt: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_TT_MULTIPLE_OLT_FILE)
voltha-pm-data-multiolt-kind-tt: voltha-pm-data-tests
diff --git a/VERSION b/VERSION
index 4067d1d..38bc521 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.8.10
+2.8.11
diff --git a/libraries/utils.robot b/libraries/utils.robot
index aa5f060..9c24def 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -1114,7 +1114,10 @@
Run Keyword If ${kail_process} Terminate Process ${kail_process}
${test_logfile}= Run Keyword If "${container_log_dir}" != "${None}"
... Join Path ${container_log_dir} ${label}-combined.log
- Run Keyword If Test Passed Run Keyword If "${test_logfile}" != "${None}" Remove File ${test_logfile}
+ Run Keyword If Test Passed
+ ... Run Keyword If "${logging}" == "False"
+ ... Run Keyword If "${test_logfile}" != "${None}"
+ ... Remove File ${test_logfile}
Run Keyword If ${has_dataplane} Echo Message to OLT Logs END ${label}
Clean Up Linux
diff --git a/tests/functional/Voltha_ErrorScenarios.robot b/tests/functional/Voltha_ErrorScenarios.robot
index d41a7d6..bf00856 100755
--- a/tests/functional/Voltha_ErrorScenarios.robot
+++ b/tests/functional/Voltha_ErrorScenarios.robot
@@ -55,6 +55,10 @@
# Per-test logging on failure is turned off by default; set this variable to enable
${container_log_dir} ${None}
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Adding the same OLT before and after enabling the device
[Documentation] Create OLT, Create the same OLT again and Check for the Error message
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index e7a91ad..e0e8eb7 100755
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -57,6 +57,10 @@
# Per-test logging on failure is turned off by default; set this variable to enable
${container_log_dir} ${None}
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Verify ONU after rebooting physically
[Documentation] Test the ONU functionality by physically turning on/off ONU.
diff --git a/tests/functional/Voltha_MultiOLT_Tests.robot b/tests/functional/Voltha_MultiOLT_Tests.robot
index bfff1d3..c9cc74c 100755
--- a/tests/functional/Voltha_MultiOLT_Tests.robot
+++ b/tests/functional/Voltha_MultiOLT_Tests.robot
@@ -55,6 +55,10 @@
# Per-test logging on failure is turned off by default; set this variable to enable
${container_log_dir} ${None}
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Verify OLT after rebooting physically - MultipleOLT
[Documentation] Test the physical reboot of the OLT
diff --git a/tests/functional/Voltha_ONOSHATests.robot b/tests/functional/Voltha_ONOSHATests.robot
index 809a945..73ca6da 100644
--- a/tests/functional/Voltha_ONOSHATests.robot
+++ b/tests/functional/Voltha_ONOSHATests.robot
@@ -57,6 +57,10 @@
# Per-test logging on failure is turned off by default; set this variable to enable
${container_log_dir} ${None}
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Verify restart ONOS instace master of device after subscriber is provisioned
[Documentation] Restat ONOS instance master of a given device and check that during restart and after the
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 111220e..cfd5f2f 100755
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -63,6 +63,10 @@
# Per-test logging on failure is turned off by default; set this variable to enable
${container_log_dir} ${None}
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Reboot ONUs Physically
[Documentation] This test reboots ONUs physically before execution all the tests
diff --git a/tests/software-upgrades/ONOS_AppsUpgrade.robot b/tests/software-upgrades/ONOS_AppsUpgrade.robot
index fbd04db..0b6418b 100755
--- a/tests/software-upgrades/ONOS_AppsUpgrade.robot
+++ b/tests/software-upgrades/ONOS_AppsUpgrade.robot
@@ -56,6 +56,10 @@
# Per-test logging on failure is turned off by default; set this variable to enable
${container_log_dir} ${None}
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
# ONOS Apps to Test for Software Upgrade need to be passed in the following variable in format:
# <app-name>,<version>,<oar-url>*<app-name>,<version>,<oar-url>*
# Example: org.opencord.aaa,2.3.0.SNAPSHOT,
diff --git a/tests/software-upgrades/ONU_Upgrade.robot b/tests/software-upgrades/ONU_Upgrade.robot
index 0230bb1..978e2c5 100755
--- a/tests/software-upgrades/ONU_Upgrade.robot
+++ b/tests/software-upgrades/ONU_Upgrade.robot
@@ -57,6 +57,10 @@
${suppressaddsubscriber} True
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
# ONU Image to test for Upgrade needs to be passed in the following format:
${image_version} ${EMPTY}
# Example value: BBSM_IMG_00002
diff --git a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
index c3ef8aa..820515a 100755
--- a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
+++ b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
@@ -57,6 +57,10 @@
${suppressaddsubscriber} True
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
# Voltha Components to Test for Software Upgrade need to be passed in the following variable in format:
# <comp-label>,<comp-container>,<comp-image>*<comp-label>,<comp-container>,<comp-image>*
# Example: adapter-open-olt,adapter-open-olt,voltha/voltha-openolt-adapter:3.1.3*
diff --git a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
index 0c87b30..5b54501 100755
--- a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
+++ b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
@@ -57,6 +57,10 @@
${suppressaddsubscriber} True
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Verify ONU after Rebooting Physically for TT
[Documentation] Test the ONU functionality by physically turning on/off ONU.
diff --git a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
index 4adfcc6..e746223 100755
--- a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
+++ b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
@@ -60,6 +60,10 @@
${upper_margin_pct} 120 # Allow 20% under the limit
${pon_max_bw_capacity_xgs}= 9700000 # Mbps, for xgs-pon OLT, when FEC Disabled
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Test that the BW is limited to Limiting Bandwidth
[Documentation] Verify support for Tcont type 1.
diff --git a/tests/tt-workflow/Voltha_TT_PODTests.robot b/tests/tt-workflow/Voltha_TT_PODTests.robot
index 2bb332a..9cbb3c5 100755
--- a/tests/tt-workflow/Voltha_TT_PODTests.robot
+++ b/tests/tt-workflow/Voltha_TT_PODTests.robot
@@ -57,6 +57,10 @@
${suppressaddsubscriber} True
+# logging flag to enable Voltha Components Logging, can be passed via the command line too
+# example: -v logging:False
+${logging} True
+
*** Test Cases ***
Reboot TT ONUs Physically - Clean Up
[Documentation] This test reboots ONUs physically before execution all the tests