Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 1 | #!/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 | |
| 17 | import sys |
| 18 | import unittest |
| 19 | |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 20 | import acts_android_device_test |
Ang Li | 1391fae | 2016-06-08 18:12:07 -0700 | [diff] [blame] | 21 | import acts_asserts_test |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 22 | import acts_base_class_test |
Ang Li | 4492aa1 | 2016-11-03 15:46:35 -0700 | [diff] [blame] | 23 | import acts_host_utils_test |
Ang Li | b4c8e17 | 2016-07-21 15:49:25 -0700 | [diff] [blame] | 24 | import acts_logger_test |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 25 | import acts_records_test |
Ang Li | 06c05ab | 2016-06-16 17:16:25 -0700 | [diff] [blame] | 26 | import acts_sl4a_client_test |
Ang Li | 6efbf0e | 2016-03-22 19:13:56 -0700 | [diff] [blame] | 27 | import acts_test_runner_test |
Ang Li | 60b071d | 2016-06-29 12:52:42 -0700 | [diff] [blame] | 28 | import acts_utils_test |
| 29 | |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 30 | |
| 31 | def compile_suite(): |
| 32 | test_classes_to_run = [ |
Ang Li | 1391fae | 2016-06-08 18:12:07 -0700 | [diff] [blame] | 33 | acts_asserts_test.ActsAssertsTest, |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 34 | acts_base_class_test.ActsBaseClassTest, |
Ang Li | 6efbf0e | 2016-03-22 19:13:56 -0700 | [diff] [blame] | 35 | acts_test_runner_test.ActsTestRunnerTest, |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 36 | acts_android_device_test.ActsAndroidDeviceTest, |
Ang Li | 06c05ab | 2016-06-16 17:16:25 -0700 | [diff] [blame] | 37 | acts_records_test.ActsRecordsTest, |
Ang Li | 60b071d | 2016-06-29 12:52:42 -0700 | [diff] [blame] | 38 | acts_sl4a_client_test.ActsSl4aClientTest, |
tturney | 0cda4c8 | 2016-11-23 15:06:14 -0800 | [diff] [blame] | 39 | acts_utils_test.ActsUtilsTest, acts_logger_test.ActsLoggerTest, |
Ang Li | 4492aa1 | 2016-11-03 15:46:35 -0700 | [diff] [blame] | 40 | acts_host_utils_test.ActsHostUtilsTest |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 41 | ] |
| 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 Li | 60b071d | 2016-06-29 12:52:42 -0700 | [diff] [blame] | 53 | |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 54 | if __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()) |