Remove controller_configs and user_params initialization to empty dict (obsolete with mobly 1.10)
TestRunConfig's controller_configs and user_params are now initialized to {} upstream, removing the need
to override these values in ACTS.
Bug: None
Test: unit tests, BleScanApiTest
Change-Id: I58efbdcf3bb945cba59d0e2a861d4a795a544fa6
diff --git a/acts/framework/acts/bin/act.py b/acts/framework/acts/bin/act.py
index 72cb0c3..769ce04 100755
--- a/acts/framework/acts/bin/act.py
+++ b/acts/framework/acts/bin/act.py
@@ -195,20 +195,12 @@
args.config, args.testbed)
for test_run_config in parsed_configs:
- # TODO(markdr): Remove this statement after the next Mobly release.
- test_run_config.testbed_name = getattr(test_run_config, 'testbed_name',
- test_run_config.test_bed_name)
-
if args.testpaths:
tp_key = keys.Config.key_test_paths.value
test_run_config.controller_configs[tp_key] = args.testpaths
if args.logpath:
test_run_config.log_path = args.logpath
if args.test_case_iterations:
- # TODO(markdr): Remove this check after the next Mobly release.
- if test_run_config.user_params is None:
- test_run_config.user_params = {}
-
ti_key = keys.Config.key_test_case_iterations.value
test_run_config.user_params[ti_key] = args.test_case_iterations
diff --git a/acts/framework/setup.py b/acts/framework/setup.py
index c52f939..be65be6 100755
--- a/acts/framework/setup.py
+++ b/acts/framework/setup.py
@@ -37,7 +37,7 @@
'scapy',
'pylibftdi',
'xlsxwriter',
- 'mobly',
+ 'mobly>=1.10.0',
'grpcio',
'IPy',
'Monsoon',
diff --git a/acts/framework/tests/acts_test_decorators_test.py b/acts/framework/tests/acts_test_decorators_test.py
index c360669..4f69cbe 100755
--- a/acts/framework/tests/acts_test_decorators_test.py
+++ b/acts/framework/tests/acts_test_decorators_test.py
@@ -158,10 +158,6 @@
cls.MOCK_CONFIG.testbed_name = 'SampleTestBed'
cls.MOCK_CONFIG.log_path = cls.tmp_dir
- # TODO(markdr): Remove after the next Mobly release.
- cls.MOCK_CONFIG.user_params = {}
- cls.MOCK_CONFIG.controller_configs = {}
-
cls.MOCK_TEST_RUN_LIST = [(MockTest.__name__,
[MockTest.TEST_CASE_LIST])]
diff --git a/acts/framework/tests/event/event_bus_integration_test.py b/acts/framework/tests/event/event_bus_integration_test.py
index deee932..8ac0321 100755
--- a/acts/framework/tests/event/event_bus_integration_test.py
+++ b/acts/framework/tests/event/event_bus_integration_test.py
@@ -65,10 +65,6 @@
test_run_config.testbed_name = 'SampleTestBed'
test_run_config.log_path = tmp_dir
- # TODO(markdr): Remove stanza the next Mobly release.
- test_run_config.user_params = {}
- test_run_config.controller_configs = {}
-
TestRunner(test_run_config, [('TestClass', [])]).run(TestClass)
self.assertGreaterEqual(len(TestClass.instance_event_received), 1)
@@ -89,8 +85,6 @@
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = ''
test_run_config.log_path = ''
- # TODO(markdr): Remove this line after the next Mobly release.
- test_run_config.user_params = {}
test_object = TestClass(test_run_config)
bundle = subscription_bundle.create_from_instance(test_object)
bundle.register()
diff --git a/acts/framework/tests/libs/version_selector_test.py b/acts/framework/tests/libs/version_selector_test.py
index cb0ef13..217bf89 100755
--- a/acts/framework/tests/libs/version_selector_test.py
+++ b/acts/framework/tests/libs/version_selector_test.py
@@ -106,6 +106,7 @@
test_run_config = TestRunConfig()
test_run_config.log_path = ''
test_run_config.summary_writer = mock.MagicMock()
+
test_class = VersionedTestClass(test_run_config)
test_class.run(['test_1', 'test_2'])
diff --git a/acts/framework/tests/metrics/loggers/blackbox_test.py b/acts/framework/tests/metrics/loggers/blackbox_test.py
index e2d3fde..75b9924 100644
--- a/acts/framework/tests/metrics/loggers/blackbox_test.py
+++ b/acts/framework/tests/metrics/loggers/blackbox_test.py
@@ -180,9 +180,6 @@
test_run_config.log_path = tempfile.mkdtemp()
test_run_config.controller_configs = {'testpaths': ['./']}
- # TODO(markdr): remove after the next Mobly release.
- test_run_config.user_params = {}
-
mock_module = Mock()
setattr(mock_module, test_class.__name__, test_class)
utils.find_files.return_value = [(None, None, None)]
diff --git a/acts/framework/tests/test_utils/power/tel/lab/consume_parameter_test.py b/acts/framework/tests/test_utils/power/tel/lab/consume_parameter_test.py
index ad63848..630366a 100644
--- a/acts/framework/tests/test_utils/power/tel/lab/consume_parameter_test.py
+++ b/acts/framework/tests/test_utils/power/tel/lab/consume_parameter_test.py
@@ -35,9 +35,7 @@
self.tb_key = 'testbed_configs'
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'MockTestBed'
- test_run_config.controller_configs = {}
test_run_config.log_path = '/tmp'
- test_run_config.user_params = {}
test_run_config.summary_writer = mock.MagicMock()
test = self.PCBT(test_run_config)
self.test = test
diff --git a/acts/framework/tests/test_utils/power/tel/lab/ensure_valid_calibration_table_test.py b/acts/framework/tests/test_utils/power/tel/lab/ensure_valid_calibration_table_test.py
index 60909db..ab619da 100644
--- a/acts/framework/tests/test_utils/power/tel/lab/ensure_valid_calibration_table_test.py
+++ b/acts/framework/tests/test_utils/power/tel/lab/ensure_valid_calibration_table_test.py
@@ -41,9 +41,7 @@
self.tb_key = 'testbed_configs'
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'MockTestBed'
- test_run_config.controller_configs = {}
test_run_config.log_path = '/tmp'
- test_run_config.user_params = {}
test_run_config.summary_writer = mock.MagicMock()
test = self.PCBT(test_run_config)
self.test = test
diff --git a/acts/framework/tests/test_utils/power/tel/lab/init_simulation_test.py b/acts/framework/tests/test_utils/power/tel/lab/init_simulation_test.py
index 45ab3f9..e0c5e5e 100644
--- a/acts/framework/tests/test_utils/power/tel/lab/init_simulation_test.py
+++ b/acts/framework/tests/test_utils/power/tel/lab/init_simulation_test.py
@@ -37,9 +37,7 @@
self.tb_key = 'testbed_configs'
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'MockTestBed'
- test_run_config.controller_configs = {}
test_run_config.log_path = '/tmp'
- test_run_config.user_params = {}
test_run_config.summary_writer = mock.MagicMock()
test = self.PCBT(test_run_config)
self.test = test
diff --git a/acts/framework/tests/test_utils/power/tel/lab/initialize_simulator_test.py b/acts/framework/tests/test_utils/power/tel/lab/initialize_simulator_test.py
index bf3ab52..5e7f8b9 100644
--- a/acts/framework/tests/test_utils/power/tel/lab/initialize_simulator_test.py
+++ b/acts/framework/tests/test_utils/power/tel/lab/initialize_simulator_test.py
@@ -37,9 +37,7 @@
self.tb_key = 'testbed_configs'
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'MockTestBed'
- test_run_config.controller_configs = {}
test_run_config.log_path = '/tmp'
- test_run_config.user_params = {}
test_run_config.summary_writer = mock.MagicMock()
test = self.PCBT(test_run_config)
self.test = test
diff --git a/acts/framework/tests/test_utils/power/tel/lab/power_tel_traffic_e2e_test.py b/acts/framework/tests/test_utils/power/tel/lab/power_tel_traffic_e2e_test.py
index 4f2a06a..6df3dc4 100644
--- a/acts/framework/tests/test_utils/power/tel/lab/power_tel_traffic_e2e_test.py
+++ b/acts/framework/tests/test_utils/power/tel/lab/power_tel_traffic_e2e_test.py
@@ -52,9 +52,7 @@
self.tb_key = 'testbed_configs'
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'MockTestBed'
- test_run_config.controller_configs = {}
test_run_config.log_path = '/tmp'
- test_run_config.user_params = {}
test_run_config.summary_writer = mock.MagicMock()
test = self.PTTT(test_run_config)
mock_android = mock.Mock()
diff --git a/acts/framework/tests/test_utils/power/tel/lab/save_summary_to_file_test.py b/acts/framework/tests/test_utils/power/tel/lab/save_summary_to_file_test.py
index ebc34ed..1fb95c8 100644
--- a/acts/framework/tests/test_utils/power/tel/lab/save_summary_to_file_test.py
+++ b/acts/framework/tests/test_utils/power/tel/lab/save_summary_to_file_test.py
@@ -38,9 +38,7 @@
self.tb_key = 'testbed_configs'
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'MockTestBed'
- test_run_config.controller_configs = {}
test_run_config.log_path = '/tmp'
- test_run_config.user_params = {}
test_run_config.summary_writer = mock.MagicMock()
test = self.PCBT(test_run_config)
self.test = test
diff --git a/acts/tests/meta/ActsUnitTest.py b/acts/tests/meta/ActsUnitTest.py
index 1d4f9f1..f9f6076 100755
--- a/acts/tests/meta/ActsUnitTest.py
+++ b/acts/tests/meta/ActsUnitTest.py
@@ -72,8 +72,6 @@
test_run_config = mobly_config_parser.TestRunConfig()
test_run_config.testbed_name = 'UnitTests'
test_run_config.log_path = ''
- # TODO(markdr): Remove after next Mobly release.
- test_run_config.user_params = {}
ActsUnitTest(test_run_config).test_units()