From bde88459134223c4a622f8e825fcc78807f17f1c Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Thu, 15 Feb 2024 16:12:11 -0500 Subject: [PATCH] test_qcomgpsd: subtest the gps_runtime scenarios (#31485) * subtest this * runtime --------- Co-authored-by: Comma Device old-commit-hash: c2b9f7163ace207038d4d17096f056b61c7644ba --- system/qcomgpsd/tests/test_qcomgpsd.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/system/qcomgpsd/tests/test_qcomgpsd.py b/system/qcomgpsd/tests/test_qcomgpsd.py index 8291f2cc32..6c93f7dd93 100755 --- a/system/qcomgpsd/tests/test_qcomgpsd.py +++ b/system/qcomgpsd/tests/test_qcomgpsd.py @@ -68,13 +68,14 @@ class TestRawgpsd(unittest.TestCase): def test_turns_off_gnss(self): for s in (0.1, 1, 5): - managed_processes['qcomgpsd'].start() - time.sleep(s) - managed_processes['qcomgpsd'].stop() + with self.subTest(runtime=s): + managed_processes['qcomgpsd'].start() + time.sleep(s) + managed_processes['qcomgpsd'].stop() - ls = subprocess.check_output("mmcli -m any --location-status --output-json", shell=True, encoding='utf-8') - loc_status = json.loads(ls) - assert set(loc_status['modem']['location']['enabled']) <= {'3gpp-lac-ci'} + ls = subprocess.check_output("mmcli -m any --location-status --output-json", shell=True, encoding='utf-8') + loc_status = json.loads(ls) + assert set(loc_status['modem']['location']['enabled']) <= {'3gpp-lac-ci'} def check_assistance(self, should_be_loaded):