blob: 02a9c6ed674f756ba566261f7a6a64b8bac274e6 [file] [log] [blame]
Ang Lifd7b7502016-03-15 13:51:57 -07001#!/usr/bin/env python3.4
2#
3# Copyright 2016 - The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import sys
18import unittest
19
Ang Lifd7b7502016-03-15 13:51:57 -070020import acts_android_device_test
Ang Li1391fae2016-06-08 18:12:07 -070021import acts_asserts_test
Ang Lifd7b7502016-03-15 13:51:57 -070022import acts_base_class_test
Ang Li4492aa12016-11-03 15:46:35 -070023import acts_host_utils_test
Ang Lib4c8e172016-07-21 15:49:25 -070024import acts_logger_test
Ang Lifd7b7502016-03-15 13:51:57 -070025import acts_records_test
Ang Li06c05ab2016-06-16 17:16:25 -070026import acts_sl4a_client_test
Ang Li6efbf0e2016-03-22 19:13:56 -070027import acts_test_runner_test
Ang Li60b071d2016-06-29 12:52:42 -070028import acts_utils_test
29
Ang Lifd7b7502016-03-15 13:51:57 -070030
31def compile_suite():
32 test_classes_to_run = [
Ang Li1391fae2016-06-08 18:12:07 -070033 acts_asserts_test.ActsAssertsTest,
Ang Lifd7b7502016-03-15 13:51:57 -070034 acts_base_class_test.ActsBaseClassTest,
Ang Li6efbf0e2016-03-22 19:13:56 -070035 acts_test_runner_test.ActsTestRunnerTest,
Ang Lifd7b7502016-03-15 13:51:57 -070036 acts_android_device_test.ActsAndroidDeviceTest,
Ang Li06c05ab2016-06-16 17:16:25 -070037 acts_records_test.ActsRecordsTest,
Ang Li60b071d2016-06-29 12:52:42 -070038 acts_sl4a_client_test.ActsSl4aClientTest,
tturney0cda4c82016-11-23 15:06:14 -080039 acts_utils_test.ActsUtilsTest, acts_logger_test.ActsLoggerTest,
Ang Li4492aa12016-11-03 15:46:35 -070040 acts_host_utils_test.ActsHostUtilsTest
Ang Lifd7b7502016-03-15 13:51:57 -070041 ]
42
43 loader = unittest.TestLoader()
44
45 suites_list = []
46 for test_class in test_classes_to_run:
47 suite = loader.loadTestsFromTestCase(test_class)
48 suites_list.append(suite)
49
50 big_suite = unittest.TestSuite(suites_list)
51 return big_suite
52
Ang Li60b071d2016-06-29 12:52:42 -070053
Ang Lifd7b7502016-03-15 13:51:57 -070054if __name__ == "__main__":
55 # This is the entry point for running all ACTS unit tests.
56 runner = unittest.TextTestRunner()
57 results = runner.run(compile_suite())
58 sys.exit(not results.wasSuccessful())