Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10411 )

Change subject: bts_nanobts: Fix pwsup_list increasing its size every new test
......................................................................

bts_nanobts: Fix pwsup_list increasing its size every new test

variables under class section are shared among all instances, and are
used unless the specific class instance attribute is set. As a result,
the same pwsup_list object was being re-used.

Take the chance to do the same with the _pcu var, since we want same
behavior for it.

See for reference: https://stackoverflow.com/a/1716730

Fixes: OS#3456
Change-Id: I3f6a9d64b35aec33430e90872f41c3d046653ce6
---
M src/osmo_gsm_tester/bts_nanobts.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/bts_nanobts.py 
b/src/osmo_gsm_tester/bts_nanobts.py
index 7f0151f..a18f205 100644
--- a/src/osmo_gsm_tester/bts_nanobts.py
+++ b/src/osmo_gsm_tester/bts_nanobts.py
@@ -28,13 +28,13 @@

 class NanoBts(bts.Bts):

-    pwsup_list = []
-    _pcu = None
 ##############
 # PROTECTED
 ##############
     def __init__(self, suite_run, conf):
         super().__init__(suite_run, conf, 'nanobts_%s' % conf.get('label', 
'nolabel'), 'nanobts')
+        self.pwsup_list = []
+        self._pcu = None

     def _configure(self):
         if self.bsc is None:

--
To view, visit https://gerrit.osmocom.org/10411
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f6a9d64b35aec33430e90872f41c3d046653ce6
Gerrit-Change-Number: 10411
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to