Skip to content

Baudrate in test spec #3257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_config(src_paths, target, toolchain_name):
toolchain.config.add_config_files(resources.json_files)

# Add features while we find new ones
features = toolchain.config.get_features()
features = set(toolchain.config.get_features())
if features == prev_features:
break

Expand Down
10 changes: 8 additions & 2 deletions tools/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from tools.build_api import add_result_to_report
from tools.build_api import prepare_toolchain
from tools.build_api import scan_resources
from tools.build_api import get_config
from tools.libraries import LIBRARIES, LIBRARY_MAP
from tools.options import extract_profile
from tools.toolchains import TOOLCHAIN_PATHS
Expand Down Expand Up @@ -2126,12 +2127,17 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
base_path = norm_relative_path(build_path, execution_directory)

target_name = target if isinstance(target, str) else target.name

cfg, macros, features = get_config(base_source_paths, target_name, toolchain_name)

baud_rate = 9600
if 'platform.stdio-baud-rate' in cfg:
baud_rate = cfg['platform.stdio-baud-rate'].value

test_build = {
"platform": target_name,
"toolchain": toolchain_name,
"base_path": base_path,
"baud_rate": 9600,
"baud_rate": baud_rate,
"binary_type": "bootable",
"tests": {}
}
Expand Down