Пример #1
0
def main():
    """! This function drives command line tool 'mbedhtrun' which is using DefaultTestSelector

    @details 1. Create DefaultTestSelector object and pass command line parameters
             2. Call default test execution function run() to start test instrumentation
    """
    test_selector = DefaultTestSelector(init_host_test_cli_params())
    try:
        test_selector.run()
    except (KeyboardInterrupt, SystemExit):
        test_selector.finish()
        raise
    except:
        pass
    else:
        test_selector.finish()
Пример #2
0
def main():
    """! This function drives command line tool 'mbedhtrun' which is using DefaultTestSelector

    @details 1. Create DefaultTestSelector object and pass command line parameters
             2. Call default test execution function run() to start test instrumentation
    """
    test_selector = DefaultTestSelector(init_host_test_cli_params())
    try:
        test_selector.run()
    except (KeyboardInterrupt, SystemExit):
        test_selector.finish()
        raise
    except:
        pass
    else:
        test_selector.finish()
Пример #3
0
def main():
    """! This function drives command line tool 'mbedhtrun' which is using DefaultTestSelector

    @details 1. Create DefaultTestSelector object and pass command line parameters
             2. Call default test execution function run() to start test instrumentation
    """
    test_selector = DefaultTestSelector(init_host_test_cli_params())
    try:
        if not sys.stdin.isatty(): # Only monitor stdin if started from a parent process.
            t = threading.Thread(target=parent_monitor_thread, args=(test_selector,))
            t.start()   # This thread will shutdown automatically after stdin is closed on returning from main()
        test_selector.run()
    except (KeyboardInterrupt, SystemExit):
        test_selector.finish()
        raise
    except:
        pass
    else:
        test_selector.finish()