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