1*c2e18aaaSAndroid Build Coastguard Worker#!/usr/bin/env python3 2*c2e18aaaSAndroid Build Coastguard Worker# 3*c2e18aaaSAndroid Build Coastguard Worker# Copyright 2024 - The Android Open Source Project 4*c2e18aaaSAndroid Build Coastguard Worker# 5*c2e18aaaSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 6*c2e18aaaSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 7*c2e18aaaSAndroid Build Coastguard Worker# You may obtain a copy of the License at 8*c2e18aaaSAndroid Build Coastguard Worker# 9*c2e18aaaSAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 10*c2e18aaaSAndroid Build Coastguard Worker# 11*c2e18aaaSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 12*c2e18aaaSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 13*c2e18aaaSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*c2e18aaaSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 15*c2e18aaaSAndroid Build Coastguard Worker# limitations under the License. 16*c2e18aaaSAndroid Build Coastguard Worker# 17*c2e18aaaSAndroid Build Coastguard Worker"""Gathers and runs all tests.""" 18*c2e18aaaSAndroid Build Coastguard Worker 19*c2e18aaaSAndroid Build Coastguard Workerimport importlib 20*c2e18aaaSAndroid Build Coastguard Workerimport unittest 21*c2e18aaaSAndroid Build Coastguard Worker 22*c2e18aaaSAndroid Build Coastguard Workerif __name__ == '__main__': 23*c2e18aaaSAndroid Build Coastguard Worker test_modules = ['tools.update_test'] 24*c2e18aaaSAndroid Build Coastguard Worker 25*c2e18aaaSAndroid Build Coastguard Worker for mod in test_modules: 26*c2e18aaaSAndroid Build Coastguard Worker importlib.import_module(mod) 27*c2e18aaaSAndroid Build Coastguard Worker loader = unittest.defaultTestLoader 28*c2e18aaaSAndroid Build Coastguard Worker test_suite = loader.loadTestsFromNames(test_modules) 29*c2e18aaaSAndroid Build Coastguard Worker runner = unittest.TextTestRunner(verbosity=2) 30*c2e18aaaSAndroid Build Coastguard Worker runner.run(test_suite) 31