blob: 406a4f02d3a1d6fe5b113718299a94416e9e13d5 [file] [log] [blame]
Eric Lin7968f052022-03-17 15:05:42 +00001# Copyright (C) 2022 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"""The entry point for Nearby Mainline multi devices end-to-end test suite."""
16
17import logging
18import sys
19
20from mobly import suite_runner
21
22import seeker_discover_provider_test
Eric Lind374aeb2022-03-18 08:34:24 +000023import seeker_show_halfsheet_test
Eric Lin7968f052022-03-17 15:05:42 +000024
25_BOOTSTRAP_LOGGING_FILENAME = '/tmp/nearby_multi_devices_test_suite_log.txt'
26_TEST_CLASSES_LIST = [
27 seeker_discover_provider_test.SeekerDiscoverProviderTest,
Eric Lind374aeb2022-03-18 08:34:24 +000028 seeker_show_halfsheet_test.SeekerShowHalfSheetTest,
Eric Lin7968f052022-03-17 15:05:42 +000029]
30
31
32def _valid_argument(arg: str) -> bool:
33 return arg.startswith(('--config', '-c', '--tests', '--test_case'))
34
35
36if __name__ == '__main__':
37 logging.basicConfig(filename=_BOOTSTRAP_LOGGING_FILENAME, level=logging.INFO)
38 suite_runner.run_suite(argv=[arg for arg in sys.argv if _valid_argument(arg)],
39 test_classes=_TEST_CLASSES_LIST)