mbed os with nrf51 internal bandgap enabled to read battery level
Dependents: BLE_file_test BLE_Blink ExternalEncoder
tools/host_tests/__init__.py@0:f269e3021894, 2016-10-23 (annotated)
- Committer:
- elessair
- Date:
- Sun Oct 23 15:10:02 2016 +0000
- Revision:
- 0:f269e3021894
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
elessair | 0:f269e3021894 | 1 | """ |
elessair | 0:f269e3021894 | 2 | mbed SDK |
elessair | 0:f269e3021894 | 3 | Copyright (c) 2011-2013 ARM Limited |
elessair | 0:f269e3021894 | 4 | |
elessair | 0:f269e3021894 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
elessair | 0:f269e3021894 | 6 | you may not use this file except in compliance with the License. |
elessair | 0:f269e3021894 | 7 | You may obtain a copy of the License at |
elessair | 0:f269e3021894 | 8 | |
elessair | 0:f269e3021894 | 9 | http://www.apache.org/licenses/LICENSE-2.0 |
elessair | 0:f269e3021894 | 10 | |
elessair | 0:f269e3021894 | 11 | Unless required by applicable law or agreed to in writing, software |
elessair | 0:f269e3021894 | 12 | distributed under the License is distributed on an "AS IS" BASIS, |
elessair | 0:f269e3021894 | 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
elessair | 0:f269e3021894 | 14 | See the License for the specific language governing permissions and |
elessair | 0:f269e3021894 | 15 | limitations under the License. |
elessair | 0:f269e3021894 | 16 | """ |
elessair | 0:f269e3021894 | 17 | |
elessair | 0:f269e3021894 | 18 | from host_registry import HostRegistry |
elessair | 0:f269e3021894 | 19 | |
elessair | 0:f269e3021894 | 20 | # Host test supervisors |
elessair | 0:f269e3021894 | 21 | from echo import EchoTest |
elessair | 0:f269e3021894 | 22 | from rtc_auto import RTCTest |
elessair | 0:f269e3021894 | 23 | from stdio_auto import StdioTest |
elessair | 0:f269e3021894 | 24 | from hello_auto import HelloTest |
elessair | 0:f269e3021894 | 25 | from detect_auto import DetectPlatformTest |
elessair | 0:f269e3021894 | 26 | from default_auto import DefaultAuto |
elessair | 0:f269e3021894 | 27 | from dev_null_auto import DevNullTest |
elessair | 0:f269e3021894 | 28 | from wait_us_auto import WaitusTest |
elessair | 0:f269e3021894 | 29 | from tcpecho_server_auto import TCPEchoServerTest |
elessair | 0:f269e3021894 | 30 | from udpecho_server_auto import UDPEchoServerTest |
elessair | 0:f269e3021894 | 31 | from tcpecho_client_auto import TCPEchoClientTest |
elessair | 0:f269e3021894 | 32 | from udpecho_client_auto import UDPEchoClientTest |
elessair | 0:f269e3021894 | 33 | from wfi_auto import WFITest |
elessair | 0:f269e3021894 | 34 | from serial_nc_rx_auto import SerialNCRXTest |
elessair | 0:f269e3021894 | 35 | from serial_nc_tx_auto import SerialNCTXTest |
elessair | 0:f269e3021894 | 36 | from serial_complete_auto import SerialCompleteTest |
elessair | 0:f269e3021894 | 37 | |
elessair | 0:f269e3021894 | 38 | # Populate registry with supervising objects |
elessair | 0:f269e3021894 | 39 | HOSTREGISTRY = HostRegistry() |
elessair | 0:f269e3021894 | 40 | HOSTREGISTRY.register_host_test("echo", EchoTest()) |
elessair | 0:f269e3021894 | 41 | HOSTREGISTRY.register_host_test("default", DefaultAuto()) |
elessair | 0:f269e3021894 | 42 | HOSTREGISTRY.register_host_test("rtc_auto", RTCTest()) |
elessair | 0:f269e3021894 | 43 | HOSTREGISTRY.register_host_test("hello_auto", HelloTest()) |
elessair | 0:f269e3021894 | 44 | HOSTREGISTRY.register_host_test("stdio_auto", StdioTest()) |
elessair | 0:f269e3021894 | 45 | HOSTREGISTRY.register_host_test("detect_auto", DetectPlatformTest()) |
elessair | 0:f269e3021894 | 46 | HOSTREGISTRY.register_host_test("default_auto", DefaultAuto()) |
elessair | 0:f269e3021894 | 47 | HOSTREGISTRY.register_host_test("wait_us_auto", WaitusTest()) |
elessair | 0:f269e3021894 | 48 | HOSTREGISTRY.register_host_test("dev_null_auto", DevNullTest()) |
elessair | 0:f269e3021894 | 49 | HOSTREGISTRY.register_host_test("tcpecho_server_auto", TCPEchoServerTest()) |
elessair | 0:f269e3021894 | 50 | HOSTREGISTRY.register_host_test("udpecho_server_auto", UDPEchoServerTest()) |
elessair | 0:f269e3021894 | 51 | HOSTREGISTRY.register_host_test("tcpecho_client_auto", TCPEchoClientTest()) |
elessair | 0:f269e3021894 | 52 | HOSTREGISTRY.register_host_test("udpecho_client_auto", UDPEchoClientTest()) |
elessair | 0:f269e3021894 | 53 | HOSTREGISTRY.register_host_test("wfi_auto", WFITest()) |
elessair | 0:f269e3021894 | 54 | HOSTREGISTRY.register_host_test("serial_nc_rx_auto", SerialNCRXTest()) |
elessair | 0:f269e3021894 | 55 | HOSTREGISTRY.register_host_test("serial_nc_tx_auto", SerialNCTXTest()) |
elessair | 0:f269e3021894 | 56 | HOSTREGISTRY.register_host_test("serial_complete_auto", SerialCompleteTest()) |
elessair | 0:f269e3021894 | 57 | |
elessair | 0:f269e3021894 | 58 | ############################################################################### |
elessair | 0:f269e3021894 | 59 | # Functional interface for test supervisor registry |
elessair | 0:f269e3021894 | 60 | ############################################################################### |
elessair | 0:f269e3021894 | 61 | |
elessair | 0:f269e3021894 | 62 | |
elessair | 0:f269e3021894 | 63 | def get_host_test(ht_name): |
elessair | 0:f269e3021894 | 64 | return HOSTREGISTRY.get_host_test(ht_name) |
elessair | 0:f269e3021894 | 65 | |
elessair | 0:f269e3021894 | 66 | def is_host_test(ht_name): |
elessair | 0:f269e3021894 | 67 | return HOSTREGISTRY.is_host_test(ht_name) |