Skip to content

[Tools] Force program_cycle_s to be used as an attribue everywhere #2032

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 1 commit into from
Jun 28, 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/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
# Import pyserial: https://pypi.python.org/pypi/pyserial
from serial import Serial

sleep(TARGET_MAP[mcu].program_cycle_s())
sleep(TARGET_MAP[mcu].program_cycle_s)

serial = Serial(options.serial, timeout = 1)
if options.baud:
Expand Down
1 change: 1 addition & 0 deletions tools/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def __init__(self, name):
# Create also a list with only the names of the targets in the resolution order
self.resolution_order_names = [t[0] for t in self.resolution_order]

@property
def program_cycle_s(self):
try:
return self.__getattr__("program_cycle_s")
Expand Down
3 changes: 1 addition & 2 deletions tools/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def handle_mut(self, mut, data, target_name, toolchain_name, test_loops=1):
reset=host_test_reset,
reset_tout=reset_tout,
copy_method=selected_copy_method,
program_cycle_s=target_by_mcu.program_cycle_s())
program_cycle_s=target_by_mcu.program_cycle_s)
single_test_result, single_test_output, single_testduration, single_timeout = host_test_result

# Store test result
Expand Down Expand Up @@ -2083,4 +2083,3 @@ def test_spec_from_test_builds(test_builds):
return {
"builds": test_builds
}