def do_dc_offset_removal_test(testlevel):

    # Check if the test is running in an environment with hardware resources
    # available - the test takes a long time to run in the simulator
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'remote resourcer not avaliable'
        return

    binary = 'test_dc_offset_removal/bin/test_dc_offset_removal.xe'

    tester = xmostest.ComparisonTester(open('test_dc_offset_removal.expect'),
                                       'lib_mic_array',
                                       'lib_mic_array_backend_tests',
                                       'dc_offset_removal_test_%s'%testlevel)

    tester.set_min_testlevel(testlevel)

    resources = xmostest.request_resource("testrig_os_x_12",
                                          tester)

    run_job = xmostest.run_on_xcore(resources['uac2_xcore200_mc_analysis_device_1'],
                                    binary,
                                    tester=tester)

    xmostest.complete_all_jobs()
Exemple #2
0
def do_dc_offset_removal_test(testlevel):

    # Check if the test is running in an environment with hardware resources
    # available - the test takes a long time to run in the simulator
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'remote resourcer not avaliable'
        return

    binary = 'test_dc_offset_removal/bin/test_dc_offset_removal.xe'

    tester = xmostest.ComparisonTester(open('test_dc_offset_removal.expect'),
                                       'lib_mic_array',
                                       'lib_mic_array_backend_tests',
                                       'dc_offset_removal_test_%s' % testlevel)

    tester.set_min_testlevel(testlevel)

    resources = xmostest.request_resource("testrig_os_x_11", tester)

    run_job = xmostest.run_on_xcore(
        resources['uac2_xcore200_mc_analysis_device_1'], binary, tester=tester)

    xmostest.complete_all_jobs()
Exemple #3
0
def do_backend_test(length, frame_count, testlevel):

    # Check if the test is running in an environment with hardware resources
    # available - the test takes a long time to run in the simulator
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'remote resourcer not avaliable'
        return

    binary = 'test_fir_model/bin/COUNT{fc}_{len}/test_fir_model_COUNT{fc}_{len}.xe'.format(
        fc=frame_count, len=length)

    tester = xmostest.ComparisonTester(open('fir_model.expect'),
                                       'lib_mic_array',
                                       'lib_mic_array_backend_tests',
                                       'backend_test_%s' % testlevel, {
                                           'frame_count': frame_count,
                                           'length': length
                                       })

    tester.set_min_testlevel(testlevel)

    resources = xmostest.request_resource("uac2_xcore200_mc_testrig_os_x_11",
                                          tester)

    run_job = xmostest.run_on_xcore(resources['analysis_device_1'],
                                    binary,
                                    tester=tester,
                                    timeout=3600)

    xmostest.complete_all_jobs()
def do_backend_test(length, frame_count, testlevel):

    # Check if the test is running in an environment with hardware resources
    # available - the test takes a long time to run in the simulator
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'remote resourcer not avaliable'
        return

    binary = 'test_fir_model/bin/COUNT{fc}_{len}/test_fir_model_COUNT{fc}_{len}.xe'.format(fc=frame_count, len=length)

    tester = xmostest.ComparisonTester(open('fir_model.expect'),
                                       'lib_mic_array',
                                       'lib_mic_array_backend_tests',
                                       'backend_test_%s'%testlevel,
                                       {'frame_count':frame_count, 'length':length})

    tester.set_min_testlevel(testlevel)

    resources = xmostest.request_resource("testrig_os_x_12",
                                          tester)

    run_job = xmostest.run_on_xcore(resources['uac2_xcore200_mc_analysis_device_1'],
                                    binary,
                                    tester=tester, timeout=3600)

    xmostest.complete_all_jobs()
Exemple #5
0
def runtest():

    # Check if the test is running in an environment with hardware resources
    # i.e. if not running from usb audio view it will quit. lib_device_control
    # is in the usb audio view so it will build
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'remote resourcer not avaliable'
        return

    device_app_name = 'usb_end_to_end_hardware/bin/usb_end_to_end_hardware.xe'.format(
    )
    #This path is relative from xmostest in the view used. goes up and back down to lib_device_control
    host_app_name = '../../../../lib_device_control/tests/usb_end_to_end_hardware_host/bin/usb_end_to_end_hardware_host.bin'

    # Setup the tester which will determine and record the result
    tester = xmostest.CombinedTester(
        2, device_control_endtoend_tester("usb", host_app_name,
                                          device_app_name))

    testlevel = 'smoke'
    tester.set_min_testlevel(testlevel)

    board = 'testrig_os_x_12'

    # Get the hardware resources to run the test on
    resources = None
    try:
        resources = xmostest.request_resource(board,
                                              tester,
                                              remote_resource_lease_time=30)
    except xmostest.XmosTestError:
        print "Unable to find required board %s required to run test" % board
        tester.shutdown()
        return

    env = ""

    # Start the xCORE DUT
    device_job = xmostest.run_on_xcore(resources['uac2_xcore200_mc_dut'],
                                       device_app_name,
                                       do_xe_prebuild=True,
                                       tester=tester[0],
                                       enable_xscope=True,
                                       xscope_handler=None,
                                       timeout=30,
                                       build_env=env)

    # Start the control app
    host_job = xmostest.run_on_pc(
        resources['host'], [host_app_name],
        tester=tester[1],
        timeout=30,
        initial_delay=10
    )  #Enough time for xtag to load firmware and host to enumerate device

    xmostest.complete_all_jobs()
def runtest():
    # Check if the test is running in an environment where
    # it can access the machine with the slice kit attached
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'Remote resourcer not avaliable'
        return

    if xmostest.testlevel_is_at_least(xmostest.get_testlevel(), 'smoke'):
        packets = 1000
    elif xmostest.testlevel_is_at_least(xmostest.get_testlevel(), 'nightly'):
        packets = 10000
    else:  # weekend
        packets = 100000

    tests = [  # device     ip               processes ports mii    protocol
        ['EXPLORER', '192.168.1.198', 1, 1, 'ETH', 'UDP', 'UIP'],
        ['EXPLORER', '192.168.1.198', 1, 1, 'ETH', 'TCP', 'UIP'],
        ['EXPLORER', '192.168.1.198', 2, 2, 'ETH', 'UDP', 'UIP'],
        ['EXPLORER', '192.168.1.198', 2, 2, 'ETH', 'TCP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'RAW', 'UDP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'RAW', 'TCP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'RAW', 'UDP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'RAW', 'TCP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'ETH', 'UDP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'ETH', 'TCP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'ETH', 'UDP', 'UIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'ETH', 'TCP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 1, 1, 'RAW', 'UDP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 1, 1, 'RAW', 'TCP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 2, 2, 'RAW', 'UDP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 2, 2, 'RAW', 'TCP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 1, 1, 'ETH', 'UDP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 1, 1, 'ETH', 'TCP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 2, 2, 'ETH', 'UDP', 'UIP'],
        ['SLICEKIT', '192.168.1.196', 2, 2, 'ETH', 'TCP', 'UIP'],
        ['EXPLORER', '192.168.1.198', 1, 1, 'ETH', 'UDP', 'LWIP'],
        ['EXPLORER', '192.168.1.198', 1, 1, 'ETH', 'TCP', 'LWIP'],
        ['EXPLORER', '192.168.1.198', 2, 2, 'ETH', 'UDP', 'LWIP'],
        ['EXPLORER', '192.168.1.198', 2, 2, 'ETH', 'TCP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'RAW', 'UDP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'RAW', 'TCP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'RAW', 'UDP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'RAW', 'TCP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'ETH', 'UDP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 1, 1, 'ETH', 'TCP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'ETH', 'UDP', 'LWIP'],
        ['MICARRAY', '192.168.1.197', 2, 2, 'ETH', 'TCP', 'LWIP'],
    ]

    for conf in tests:
        test(packets, 0.002, *conf)
def runtest():
    # Check if the test is running in an environment where
    # it can access the machine with the devices attached
    args = xmostest.getargs()
    if not args.remote_resourcer:
        # Abort the test
        print 'Remote resourcer not avaliable'
        return

    test('slicekit', '192.168.2.5', '<!DOCTYPE html>' +
                                    '<html><head><title>Hello world</title></head>' +
                                    '<body>Hello World!</body></html>\n')
def runtest():

    # Check if the test is running in an environment with hardware resources
    # i.e. if not running from usb audio view it will quit. lib_device_control
    # is in the usb audio view so it will build
    args = xmostest.getargs()
    if not args.remote_resourcer:
      # Abort the test
      print 'remote resourcer not avaliable'
      return

    device_app_name = 'usb_end_to_end_hardware/bin/usb_end_to_end_hardware.xe'.format()
    #This path is relative from xmostest in the view used. goes up and back down to lib_device_control
    host_app_name = '../../../../lib_device_control/tests/usb_end_to_end_hardware_host/bin/usb_end_to_end_hardware_host.bin'

    # Setup the tester which will determine and record the result
    tester = xmostest.CombinedTester(2, device_control_endtoend_tester("usb",
                                                       host_app_name, device_app_name))

    testlevel = 'smoke'
    tester.set_min_testlevel(testlevel)

    board = 'testrig_os_x_12'

    # Get the hardware resources to run the test on
    resources = None
    try:
        resources = xmostest.request_resource(board, tester, remote_resource_lease_time=30)
    except xmostest.XmosTestError:
        print "Unable to find required board %s required to run test" % board
        tester.shutdown()
        return

    env = ""

    # Start the xCORE DUT
    device_job = xmostest.run_on_xcore(resources['uac2_xcore200_mc_dut'], device_app_name,
                                        do_xe_prebuild = True,
                                        tester = tester[0],
                                        enable_xscope = True,
                                        xscope_handler = None,
                                        timeout = 30,
                                        build_env = env)

    # Start the control app
    host_job = xmostest.run_on_pc(resources['host'],
                                     [host_app_name],
                                     tester = tester[1],
                                     timeout = 30,
                                     initial_delay = 10) #Enough time for xtag to load firmware and host to enumerate device

    xmostest.complete_all_jobs()