Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-tools by
sources::test_api Namespace Reference
Data Structures | |
class | SingleTestExecutor |
class | SingleTestRunner |
class | TestLogger |
class | CLITestLogger |
Functions | |
def | get_unique_value_from_summary |
def | get_unique_value_from_summary_ext |
def | show_json_file_format_error |
def | json_format_error_defect_pos |
def | get_json_data_from_file |
def | print_muts_configuration_from_json |
def | print_test_configuration_from_json |
def | get_avail_tests_summary_table |
def | progress_bar |
def | singletest_in_cli_mode |
def | factory_db_logger |
def | detect_database_verbose |
def | get_module_avail |
def | get_autodetected_MUTS |
def | get_autodetected_TEST_SPEC |
def | get_default_test_options_parser |
Detailed Description
mbed SDK Copyright (c) 2011-2014 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Author: Przemyslaw Wirkus <Przemyslaw.wirkus@arm.com>
Function Documentation
def sources::test_api::detect_database_verbose | ( | db_url ) |
uses verbose mode (prints) database detection sequence to check it database connection string is valid
Definition at line 1604 of file test_api.py.
def sources::test_api::factory_db_logger | ( | db_url ) |
Factory database driver depending on database type supplied in database connection string db_url
Definition at line 1591 of file test_api.py.
def sources::test_api::get_autodetected_MUTS | ( | mbeds_list, | |
platform_name_filter = None |
|||
) |
Function detects all connected to host mbed-enabled devices and generates artificial MUTS file. If function fails to auto-detect devices it will return empty dictionary. if get_module_avail('mbed_lstools'): mbeds = mbed_lstools.create() mbeds_list = mbeds.list_mbeds() @param mbeds_list list of mbeds captured from mbed_lstools @param platform_name You can filter 'platform_name' with list of filtered targets from 'platform_name_filter'
Definition at line 1650 of file test_api.py.
def sources::test_api::get_autodetected_TEST_SPEC | ( | mbeds_list, | |
use_default_toolchain = True , |
|||
use_supported_toolchains = False , |
|||
toolchain_filter = None , |
|||
platform_name_filter = None |
|||
) |
Function detects all connected to host mbed-enabled devices and generates artificial test_spec file. If function fails to auto-detect devices it will return empty 'targets' test_spec description. use_default_toolchain - if True add default toolchain to test_spec use_supported_toolchains - if True add all supported toolchains to test_spec toolchain_filter - if [...list of toolchains...] add from all toolchains only those in filter to test_spec
Definition at line 1686 of file test_api.py.
def sources::test_api::get_avail_tests_summary_table | ( | cols = None , |
|
result_summary = True , |
|||
join_delim = ' , |
|||
platform_filter = None |
|||
) |
Generates table summary with all test cases and additional test cases information using pretty print functionality. Allows test suite user to see test cases
Definition at line 1369 of file test_api.py.
def sources::test_api::get_default_test_options_parser | ( | ) |
Get common test script options used by CLI, web services etc.
Definition at line 1723 of file test_api.py.
def sources::test_api::get_json_data_from_file | ( | json_spec_filename, | |
verbose = False |
|||
) |
Loads from file JSON formatted string to data structure
Definition at line 1225 of file test_api.py.
def sources::test_api::get_module_avail | ( | module_name ) |
This function returns True if module_name is already impored module
Definition at line 1630 of file test_api.py.
def sources::test_api::get_unique_value_from_summary | ( | test_summary, | |
index | |||
) |
Gets list of unique target names
Definition at line 1166 of file test_api.py.
def sources::test_api::get_unique_value_from_summary_ext | ( | test_summary, | |
index_key, | |||
index_val | |||
) |
Gets list of unique target names and return dictionary
Definition at line 1177 of file test_api.py.
def sources::test_api::json_format_error_defect_pos | ( | json_error_msg ) |
Gets first error line and column in JSON file format. Parsed from exception thrown by json.loads() string
Definition at line 1203 of file test_api.py.
def sources::test_api::print_muts_configuration_from_json | ( | json_data, | |
join_delim = " , |
|||
platform_filter = None |
|||
) |
Prints MUTs configuration passed to test script for verboseness
Definition at line 1253 of file test_api.py.
def sources::test_api::print_test_configuration_from_json | ( | json_data, | |
join_delim = " |
|||
) |
Prints test specification configuration passed to test script for verboseness
Definition at line 1288 of file test_api.py.
def sources::test_api::progress_bar | ( | percent_progress, | |
saturation = 0 |
|||
) |
This function creates progress bar with optional simple saturation mark
Definition at line 1468 of file test_api.py.
def sources::test_api::show_json_file_format_error | ( | json_spec_filename, | |
line, | |||
column | |||
) |
Prints JSON broken content
Definition at line 1189 of file test_api.py.
def sources::test_api::singletest_in_cli_mode | ( | single_test ) |
Runs SingleTestRunner object in CLI (Command line interface) mode @return returns success code (0 == success) for building and running tests
Definition at line 1480 of file test_api.py.
Generated on Thu Jun 15 2023 14:55:00 by
