Beispiel #1
0
def test_runner_imports():
    # Ensure that all runner modules are imported and returned by
    # get_runners().
    #
    # This is just a basic sanity check against errors introduced by
    # tree-wide refactorings for runners that don't have their own
    # test suites.
    runner_names = set(r.name() for r in ZephyrBinaryRunner.get_runners())

    # Please keep this sorted alphabetically.
    expected = set(('arc-nsim',
                    'blackmagicprobe',
                    'bossac',
                    'canopen',
                    'dediprog',
                    'dfu-util',
                    'esp32',
                    'gd32isp',
                    'hifive1',
                    'intel_s1000',
                    'jlink',
                    'mdb-nsim',
                    'mdb-hw',
                    'misc-flasher',
                    'nios2',
                    'nrfjprog',
                    'openocd',
                    'pyocd',
                    'qemu',
                    'stm32cubeprogrammer',
                    'stm32flash',
                    'xtensa'))
    assert runner_names == expected
def test_runner_imports():
    # Ensure that all runner modules are imported and returned by
    # get_runners().
    #
    # This is just a basic sanity check against errors introduced by
    # tree-wide refactorings for runners that don't have their own
    # test suites.
    runner_names = set(r.name() for r in ZephyrBinaryRunner.get_runners())
    expected = set(('arc-nsim', 'bossac', 'dfu-util', 'em-starterkit', 'esp32',
                    'jlink', 'nios2', 'nrfjprog', 'openocd', 'pyocd', 'qemu',
                    'xtensa', 'intel_s1000', 'blackmagicprobe'))
    assert runner_names == expected
Beispiel #3
0
def get_runner_cls(runner):
    '''Get a runner's class object, given its name.'''
    for cls in ZephyrBinaryRunner.get_runners():
        if cls.name() == runner:
            return cls
    raise ValueError('unknown runner "{}"'.format(runner))