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 | f339965 | 2016-04-11 13:48:51 -0700 | [diff] [blame] | 20 | import acts_adb_test |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 21 | import acts_android_device_test |
Ang Li | 1391fae | 2016-06-08 18:12:07 -0700 | [diff] [blame^] | 22 | import acts_asserts_test |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 23 | import acts_base_class_test |
| 24 | import acts_records_test |
Ang Li | 6efbf0e | 2016-03-22 19:13:56 -0700 | [diff] [blame] | 25 | import acts_test_runner_test |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 26 | |
| 27 | def compile_suite(): |
| 28 | test_classes_to_run = [ |
Ang Li | f339965 | 2016-04-11 13:48:51 -0700 | [diff] [blame] | 29 | acts_adb_test.ActsAdbTest, |
Ang Li | 1391fae | 2016-06-08 18:12:07 -0700 | [diff] [blame^] | 30 | acts_asserts_test.ActsAssertsTest, |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 31 | acts_base_class_test.ActsBaseClassTest, |
Ang Li | 6efbf0e | 2016-03-22 19:13:56 -0700 | [diff] [blame] | 32 | acts_test_runner_test.ActsTestRunnerTest, |
Ang Li | fd7b750 | 2016-03-15 13:51:57 -0700 | [diff] [blame] | 33 | acts_android_device_test.ActsAndroidDeviceTest, |
| 34 | acts_records_test.ActsRecordsTest |
| 35 | ] |
| 36 | |
| 37 | loader = unittest.TestLoader() |
| 38 | |
| 39 | suites_list = [] |
| 40 | for test_class in test_classes_to_run: |
| 41 | suite = loader.loadTestsFromTestCase(test_class) |
| 42 | suites_list.append(suite) |
| 43 | |
| 44 | big_suite = unittest.TestSuite(suites_list) |
| 45 | return big_suite |
| 46 | |
| 47 | if __name__ == "__main__": |
| 48 | # This is the entry point for running all ACTS unit tests. |
| 49 | runner = unittest.TextTestRunner() |
| 50 | results = runner.run(compile_suite()) |
| 51 | sys.exit(not results.wasSuccessful()) |