Mbed Host Tests
mbedhtrun.py
Go to the documentation of this file.
1"""
2mbed SDK
3Copyright (c) 2011-2016 ARM Limited
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16
17Author: Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com>
18"""
19
20from multiprocessing import freeze_support
21from mbed_host_tests import init_host_test_cli_params
22from mbed_host_tests.host_tests_runner.host_test_default import DefaultTestSelector
23
24
25def main():
26 """! This function drives command line tool 'mbedhtrun' which is using DefaultTestSelector
27 @details 1. Create DefaultTestSelector object and pass command line parameters
28 2. Call default test execution function run() to start test instrumentation
29 """
30 freeze_support()
31 result = -2
32 test_selector = DefaultTestSelector(init_host_test_cli_params())
33 try:
34 result = test_selector.execute()
35 except (KeyboardInterrupt, SystemExit):
36 test_selector.finish()
37 result = -3
38 raise
39 else:
40 test_selector.finish()
41
42 return result
Select default host_test supervision (replaced after auto detection)
main()
This function drives command line tool 'mbedhtrun' which is using DefaultTestSelector.
Definition mbedhtrun.py:25