def METHOD_NAME(board_id):
    test_pass_count = 0
    test_count = 0
    failed_commands = []
    result = CommanderTestResult()
    COMMANDS_TO_TEST = [
            # general commands
            "continue",
            "status",
            "halt",
            "status",
            # semicolon separated
            "status ; halt ; continue",
            "halt;continue",
            "halt; continue",
            # Python and shell
            "$ 2+2",
            "!echo 'hi mom'",
            " $ target.vendor",
            # commander command group - these are not tested by commands_test.py.
            "list",
            "exit", # Must be last command!
            ]
    # Set up commander args.
    args = SimpleNamespace()
    args.no_init = False
    args.frequency = 1000000
    args.options = {} #get_session_options()
    args.halt = True
    args.no_wait = True
    args.project_dir = None
    args.config = None
    args.script = None
    args.no_config = False
    args.pack = None
    args.unique_id = board_id
    args.target_override = None
    args.elf = GDB_TEST_ELF
    args.interactive = False
    #
    # Test basic functionality.
    #
    print("\n------ Testing basic functionality ------\n")
    test_count += 1
    try:
        cmdr = PyOCDCommander(args, COMMANDS_TO_TEST)
        cmdr.run()
        test_pass_count += 1
        print("TEST PASSED")
        test_count += 1
        print("Testing exit code")
        print("Exit code:", cmdr.exit_code)
        if cmdr.exit_code == 0:
            test_pass_count += 1
            print("TEST PASSED")
        else:
            print("TEST FAILED")
    except Exception:
        print("TEST FAILED")
        traceback.print_exc()
    #
    # Test running command files.
    #
    print("\n------ Testing command files ------\n")
    with tempfile.NamedTemporaryFile('w+') as cmdfile:
        cmdfile.write("""# here is a comment