Beispiel #1
0
    if not log.is_debug_on()  or  log.is_color_on():
        if configuration:
            log.progress( '[' + ' '.join( configuration ) + ']', test.name, '...' )
        else:
            log.progress( test.name, '...' )
    test.run_test()


# Run all tests
if pyrs:
    sys.path.append( pyrs_path )
from rspy import devices
devices.query()
#
# Under Travis, we'll have no devices and no acroname
skip_live_tests = len(devices.all()) == 0  and  not devices.acroname
#
log.reset_errors()
for test in prioritize_tests( get_tests() ):
    #
    log.d( 'found', test.name, '...' )
    try:
        log.debug_indent()
        test.debug_dump()
        #
        if tag and tag not in test.config.tags:
            log.d( 'does not fit --tag:', test.tags )
            continue
        #
        if not test.is_live():
            test_wrapper( test )
Beispiel #2
0
        cmd = "14 00 AB CD 86 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
    else:
        log.f("Incompatible product line:", product_line)

    send_hardware_monitor_command(device, cmd)


# find the update tool exe
fw_updater_exe = None
for tool in file.find(repo.build, '(^|/)rs-fw-update.exe$'):
    fw_updater_exe = os.path.join(repo.build, tool)
if not fw_updater_exe:
    log.f("Could not find the update tool file (rs-fw-update.exe)")

devices.query(monitor_changes=False)
sn_list = devices.all()
# acroname should ensure there is always 1 available device
if len(sn_list) != 1:
    log.f("Expected 1 device, got", len(sn_list))
device = devices.get_first(sn_list).handle
log.d('found:', device)
product_line = device.get_info(rs.camera_info.product_line)
log.d('product line:', product_line)

###############################################################################
#
test.start("Update FW")
# check if recovery. If so recover
recovered = False
if device.is_update_device():
    log.d("recovering device ...")
        cmd = "14 00 AB CD 86 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
    else:
        log.f("Incompatible product line:", product_line)

    send_hardware_monitor_command(device, cmd)


# find the update tool exe
fw_updater_exe = None
for tool in file.find(repo.root, '(^|/)rs-fw-update.exe$'):
    fw_updater_exe = os.path.join(repo.root, tool)
if not fw_updater_exe:
    log.f("Could not find the update tool file (rs-fw-update.exe)")

devices.query(monitor_changes=False)
sn_list = devices.all()
# acroname should ensure there is always 1 available device
if len(sn_list) != 1:
    log.f("Expected 1 device, got", len(sn_list))
device = devices.get(list(sn_list)[0])
log.d('found:', device)
current_fw_version = repo.pretty_fw_version(
    device.get_info(rs.camera_info.firmware_version))
log.d('FW version:', current_fw_version)
product_line = device.get_info(rs.camera_info.product_line)
log.d('product line:', product_line)
bundled_fw_version = repo.pretty_fw_version(
    device.get_info(rs.camera_info.recommended_firmware_version))
log.d('bundled FW version:', bundled_fw_version)

update_counter = get_update_counter(device)