blob: 8ee9950415f31dbec37e30d24ea74e5f46cf98d2 [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 Lif3399652016-04-11 13:48:51 -070020import acts_adb_test
Ang Lifd7b7502016-03-15 13:51:57 -070021import acts_android_device_test
Ang Li1391fae2016-06-08 18:12:07 -070022import acts_asserts_test
Ang Lifd7b7502016-03-15 13:51:57 -070023import acts_base_class_test
24import acts_records_test
Ang Li06c05ab2016-06-16 17:16:25 -070025import acts_sl4a_client_test
Ang Li6efbf0e2016-03-22 19:13:56 -070026import acts_test_runner_test
Ang Li60b071d2016-06-29 12:52:42 -070027import acts_utils_test
28
Ang Lifd7b7502016-03-15 13:51:57 -070029
30def compile_suite():
31 test_classes_to_run = [
Ang Lif3399652016-04-11 13:48:51 -070032 acts_adb_test.ActsAdbTest,
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,
39 acts_utils_test.ActsUtilsTest
Ang Lifd7b7502016-03-15 13:51:57 -070040 ]
41
42 loader = unittest.TestLoader()
43
44 suites_list = []
45 for test_class in test_classes_to_run:
46 suite = loader.loadTestsFromTestCase(test_class)
47 suites_list.append(suite)
48
49 big_suite = unittest.TestSuite(suites_list)
50 return big_suite
51
Ang Li60b071d2016-06-29 12:52:42 -070052
Ang Lifd7b7502016-03-15 13:51:57 -070053if __name__ == "__main__":
54 # This is the entry point for running all ACTS unit tests.
55 runner = unittest.TextTestRunner()
56 results = runner.run(compile_suite())
57 sys.exit(not results.wasSuccessful())