blob: a0d0bec5870e1c77fa1ab5b5a395baa4a2a4d128 [file] [log] [blame]
Junyu Lai32a2d152024-07-03 16:05:41 +08001# 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 test cases."""
16
17import sys
18from apfv4_test import ApfV4Test
Jimi Chen9bab6162024-09-13 15:20:00 +000019from apfv6_test import ApfV6Test
Junyu Lai32a2d152024-07-03 16:05:41 +080020from connectivity_multi_devices_test import ConnectivityMultiDevicesTest
21from mobly import suite_runner
22
23
24if __name__ == "__main__":
25 # For MoblyBinaryHostTest, this entry point will be called twice:
26 # 1. List tests.
27 # <mobly-par-file-name> -- --list_tests
28 # 2. Run tests.
29 # <mobly-par-file-name> -- --config=<yaml-path> \
30 # --device_serial=<device-serial> --log_path=<log-path>
31 # Strip the "--" since suite runner doesn't recognize it.
32 # While the parameters before "--" is for the infrastructure,
33 # ignore them if any. Also, do not alter parameters if there
34 # is no "--", in case the binary is invoked manually.
35 if "--" in sys.argv:
36 index = sys.argv.index("--")
37 sys.argv = sys.argv[:1] + sys.argv[index + 1 :]
38 # TODO: make the tests can be executed without manually list classes.
Jimi Chen9bab6162024-09-13 15:20:00 +000039 suite_runner.run_suite([ConnectivityMultiDevicesTest, ApfV4Test, ApfV6Test], sys.argv)