def inner(srv, run_id, accum): root = getRoot(accum) path = rjoin(root, inject_folder_name, "run") cmd = "cd %s; chmod -R 777 *; ./%s -c %s" % (path, command, program) logger.info("execute: " + cmd) print_remote_out(srv.execute(cmd))
def inner(srv, run_id, accum): root = getRoot(accum) script = script_ # seems necessary for maintaining script in scope if not script.endswith('.java'): script += '.java' path = rjoin(root, inject_folder_name) cmd = 'javac -cp %s/*.jar %s' % (path, rjoin(path, script)) logger.info('execute: ' + cmd) print_remote_out( srv.execute(cmd))
def inner(srv, run_id, accum): root = getRoot(accum) logger.info("bob on host: " + getMetadata(accum).get("host")) command = "run_bob" path = rjoin(root, inject_folder_name, "run") cmd = r"cd %s; echo %d | ./%s -r %s abcdefghijk 4" % (path, fortune, command, program) logger.info("execute: " + cmd) t1 = clock() (stdout, stderr) = srv.execute(cmd) t2 = clock() print_remote_out((None, stderr)) logger.info("".join(stdout).replace("\n", ". ")) logger.info("execution time took %d seconds" % (t2 - t1))
def inner(srv, run_id, accum): root = getRoot(accum) path = rjoin(root, inject_folder_name) cmd = 'java -cp %s/.:%s/* %s %s' % (path, path, script, remote_results_dir_F(root)) logger.info('execute: ' + cmd) print_remote_out( srv.execute(cmd) )