1# Copyright (C) 2024 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15"""Main entrypoint for all of unittest.""" 16 17import sys 18from host.python.adb_utils_test import TestAdbUtils 19from host.python.apf_utils_test import TestApfUtils 20from host.python.assert_utils_test import TestAssertUtils 21from host.python.packet_utils_test import TestPacketUtils 22from mobly import suite_runner 23 24 25if __name__ == "__main__": 26 # For MoblyBinaryHostTest, this entry point will be called twice: 27 # 1. List tests. 28 # <mobly-par-file-name> -- --list_tests 29 # 2. Run tests. 30 # <mobly-par-file-name> -- --config=<yaml-path> --device_serial=<device-serial> --log_path=<log-path> 31 # Strip the "--" since suite runner doesn't recognize it. 32 sys.argv.pop(1) 33 # TODO: make the tests can be executed without manually list classes. 34 suite_runner.run_suite( 35 [TestAssertUtils, TestAdbUtils, TestApfUtils, TestPacketUtils], sys.argv 36 ) 37