Force program_cycle_s to be used as an attribue everywhere

pull/2032/head
Jimmy Brisson 2016-06-27 16:01:52 -05:00
parent f7ad7d2e27
commit 855cc91550
3 changed files with 3 additions and 3 deletions

View File

@ -283,7 +283,7 @@ if __name__ == '__main__':
# Import pyserial: https://pypi.python.org/pypi/pyserial # Import pyserial: https://pypi.python.org/pypi/pyserial
from serial import Serial from serial import Serial
sleep(TARGET_MAP[mcu].program_cycle_s()) sleep(TARGET_MAP[mcu].program_cycle_s)
serial = Serial(options.serial, timeout = 1) serial = Serial(options.serial, timeout = 1)
if options.baud: if options.baud:

View File

@ -215,6 +215,7 @@ class Target:
# Create also a list with only the names of the targets in the resolution order # 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] self.resolution_order_names = [t[0] for t in self.resolution_order]
@property
def program_cycle_s(self): def program_cycle_s(self):
try: try:
return self.__getattr__("program_cycle_s") return self.__getattr__("program_cycle_s")

View File

@ -898,7 +898,7 @@ class SingleTestRunner(object):
reset=host_test_reset, reset=host_test_reset,
reset_tout=reset_tout, reset_tout=reset_tout,
copy_method=selected_copy_method, 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 single_test_result, single_test_output, single_testduration, single_timeout = host_test_result
# Store test result # Store test result
@ -2083,4 +2083,3 @@ def test_spec_from_test_builds(test_builds):
return { return {
"builds": test_builds "builds": test_builds
} }