Beispiel #1
0
def dpkg_arm(name, path):
    proc = pexpect.spawn('ssh -X worker@' + MASTER_IP)
    proc.expect("worker@" + MASTER_IP + "'s password:"******"sudo dpkg -i /home/worker/{}/{}_arm64.deb".format(
        name, path))
    proc.expect(r"please choose project, \[1/2/3/4/5/6/7")
    proc.sendline("1")
    proc.expect(r"Would you like to update/create superuser now")
    proc.sendline("yes")
    proc.expect(r"Username \(leave blank to use \'root\'\):")
    proc.sendline("root")
    proc.expect("Password:"******"root")
    proc.expect("Password \(again\):")
    proc.sendline("root")
    proc.expect("insert new vehicle")
    proc.sendline("y")
    proc.expect("vehicle name:")
    proc.sendline("e100")
    proc.expect("map id:")
    proc.sendline("1")
    proc.expect("installation path of uos:")
    proc.sendline("/home/worker/{}/run".format(name))
    proc.expect("worker@master")
    g_logger.info(bytes.decode(proc.before))
    print(bytes.decode(proc.before))
    proc.close()
Beispiel #2
0
def run_case(case_name, case_input, case_expt):
    global g_case_input
    global g_case_expt

    g_logger.info(case_name)

    g_case_input = parse_cell_value(case_input)
    g_case_expt = parse_cell_value(case_expt)
    dict_func[case_name]()

    return True
Beispiel #3
0
def run_case(case_name, case_input, case_expt):
    global g_case_input
    global g_case_expt

    g_logger.info(case_name)

    g_case_input = parse_cell_value(case_input)
    g_case_expt = parse_cell_value(case_expt)

    try:
        dict_func[case_name]()
    except TypeError:
        pass

    return True
Beispiel #4
0
def chk_service():
    stdout = g_ssh_master.exec_cmd(
        "systemctl status uisee_io_dispatch.service")
    g_logger.info(stdout)
    if "Active: active (running)" not in stdout:
        assert False, "Service startup failed"