Added field 'copy_config' to MUTs file format

pull/483/head
Przemek Wirkus 2014-09-10 13:39:50 +01:00
parent 33434f3c4a
commit 55a77a2721
1 changed files with 7 additions and 5 deletions

View File

@ -591,7 +591,7 @@ class SingleTestRunner(object):
except Exception, e: except Exception, e:
resutl_msg = e resutl_msg = e
result = False result = False
if copy_method == 'eACommander': elif copy_method == 'eACommander':
# For this copy method 'disk' will be 'serialno' for eACommander command line parameters # For this copy method 'disk' will be 'serialno' for eACommander command line parameters
# Note: Commands are executed in the order they are specified on the command line # Note: Commands are executed in the order they are specified on the command line
cmd = [EACOMMANDER_CMD, cmd = [EACOMMANDER_CMD,
@ -628,7 +628,6 @@ class SingleTestRunner(object):
except Exception, e: except Exception, e:
resutl_msg = e resutl_msg = e
result = False result = False
return result, resutl_msg, copy_method return result, resutl_msg, copy_method
def delete_file(self, file_path): def delete_file(self, file_path):
@ -666,8 +665,8 @@ class SingleTestRunner(object):
print "Error: No Mbed available: MUT[%s]" % data['mcu'] print "Error: No Mbed available: MUT[%s]" % data['mcu']
return None return None
disk = mut['disk'] disk = mut.get('disk')
port = mut['port'] port = mut.get('port')
target_by_mcu = TARGET_MAP[mut['mcu']] target_by_mcu = TARGET_MAP[mut['mcu']]
# Some extra stuff can be declared in MUTs structure # Some extra stuff can be declared in MUTs structure
reset_type = mut.get('reset_type') # reboot.txt, reset.txt, shutdown.txt reset_type = mut.get('reset_type') # reboot.txt, reset.txt, shutdown.txt
@ -675,6 +674,7 @@ class SingleTestRunner(object):
image_dest = mut.get('image_dest') # Image file destination DISK + IMAGE_DEST + BINARY_NAME image_dest = mut.get('image_dest') # Image file destination DISK + IMAGE_DEST + BINARY_NAME
images_config = mut.get('images_config') # Available images selection via config file images_config = mut.get('images_config') # Available images selection via config file
mobo_config = mut.get('mobo_config') # Available board configuration selection e.g. core selection etc. mobo_config = mut.get('mobo_config') # Available board configuration selection e.g. core selection etc.
copy_method = mut.get('copy_method') # Available board configuration selection e.g. core selection etc.
# Program # Program
# When the build and test system were separate, this was relative to a # When the build and test system were separate, this was relative to a
@ -695,13 +695,15 @@ class SingleTestRunner(object):
if self.db_logger: if self.db_logger:
self.db_logger.reconnect() self.db_logger.reconnect()
selected_copy_method = self.opts_copy_method if copy_method is None else copy_method
# Tests can be looped so test results must be stored for the same test # Tests can be looped so test results must be stored for the same test
test_all_result = [] test_all_result = []
for test_index in range(test_loops): for test_index in range(test_loops):
# Choose one method of copy files to mbed virtual drive # Choose one method of copy files to mbed virtual drive
#_copy_res, _err_msg, _copy_method = self.file_copy_method_selector(image_path, disk, self.opts_copy_method, image_dest=image_dest) #_copy_res, _err_msg, _copy_method = self.file_copy_method_selector(image_path, disk, self.opts_copy_method, image_dest=image_dest)
_copy_res, _err_msg, _copy_method = self.image_copy_method_selector(target_name, image_path, disk, self.opts_copy_method, _copy_res, _err_msg, _copy_method = self.image_copy_method_selector(target_name, image_path, disk, selected_copy_method,
images_config, image_dest) images_config, image_dest)
# Host test execution # Host test execution