Loading android/pandora/test/main.py +25 −5 Original line number Diff line number Diff line Loading @@ -2,14 +2,23 @@ import site site.main() import asha_test import example import gatt_test import le_advertising_test import argparse import logging import os import sys from argparse import Namespace from mobly import suite_runner from typing import List, Tuple _BUMBLE_BTSNOOP_FMT = 'bumble_btsnoop_{pid}_{instance}.log' # Import test modules. import asha_test import example import gatt_test import le_advertising_test _TEST_CLASSES_LIST = [ example.ExampleTest, Loading @@ -19,6 +28,12 @@ _TEST_CLASSES_LIST = [ ] def _parse_cli_args() -> Tuple[Namespace, List[str]]: parser = argparse.ArgumentParser(description='Avatar test runner.') parser.add_argument('-o', '--log_path', type=str, metavar='<PATH>', help='Path to the test configuration file.') return parser.parse_known_args() if __name__ == "__main__": logging.basicConfig(level=logging.INFO) Loading @@ -27,5 +42,10 @@ if __name__ == "__main__": index = sys.argv.index('--') sys.argv = sys.argv[:1] + sys.argv[index + 1 :] # Enable bumble snoop logger. ns, argv = _parse_cli_args() if ns.log_path: os.environ.setdefault('BUMBLE_SNOOPER', f'btsnoop:file:{ns.log_path}/{_BUMBLE_BTSNOOP_FMT}') # Run the test suite. suite_runner.run_suite(_TEST_CLASSES_LIST) # type: ignore suite_runner.run_suite(_TEST_CLASSES_LIST, argv) # type: ignore Loading
android/pandora/test/main.py +25 −5 Original line number Diff line number Diff line Loading @@ -2,14 +2,23 @@ import site site.main() import asha_test import example import gatt_test import le_advertising_test import argparse import logging import os import sys from argparse import Namespace from mobly import suite_runner from typing import List, Tuple _BUMBLE_BTSNOOP_FMT = 'bumble_btsnoop_{pid}_{instance}.log' # Import test modules. import asha_test import example import gatt_test import le_advertising_test _TEST_CLASSES_LIST = [ example.ExampleTest, Loading @@ -19,6 +28,12 @@ _TEST_CLASSES_LIST = [ ] def _parse_cli_args() -> Tuple[Namespace, List[str]]: parser = argparse.ArgumentParser(description='Avatar test runner.') parser.add_argument('-o', '--log_path', type=str, metavar='<PATH>', help='Path to the test configuration file.') return parser.parse_known_args() if __name__ == "__main__": logging.basicConfig(level=logging.INFO) Loading @@ -27,5 +42,10 @@ if __name__ == "__main__": index = sys.argv.index('--') sys.argv = sys.argv[:1] + sys.argv[index + 1 :] # Enable bumble snoop logger. ns, argv = _parse_cli_args() if ns.log_path: os.environ.setdefault('BUMBLE_SNOOPER', f'btsnoop:file:{ns.log_path}/{_BUMBLE_BTSNOOP_FMT}') # Run the test suite. suite_runner.run_suite(_TEST_CLASSES_LIST) # type: ignore suite_runner.run_suite(_TEST_CLASSES_LIST, argv) # type: ignore