e.log.progress(file + "\n")
def compile_init(e):
+ e.log.progress("Compiling: ")
boxdir = moe.box.setup(e)
pdir = e.cfgs["TASK_DIR"]
tdir = e.cfgs["TEST_DIR"]
xx = os.path.join(pdir, x)
e.log.verbose("Copying extra file %s\n" % xx)
shutil.copyfile(xx, os.path.join(boxdir, x))
- pass
def compile_run(e):
moe.box.show(e, "compiler input")
- rc = moe.box.run(e, e.cfgs["COMP_SANDBOX_OPTS"], e.cfgs["COMP"])
+ cc = e.cfgs["COMP"]
+ e.log.verbose("Compilation command: %s\n" % cc)
+ rc = moe.box.run(e, e.cfgs["COMP_SANDBOX_OPTS"], cc)
+ if rc > 0:
+ e.log.progress("FAILED\n")
+ ## FIXME: fill in the status file and abort the pipeline?
moe.box.show(e, "compiler output")
- pass
def compile_done(e):
- pass
+ e.log.progress("OK\n")
def tests(e):
pass
e.log.flush()
os.system("ls -Al %s | sed 's/^/\t/'" % e.cfgs["BOXDIR"])
-def run(e, opts,
+def run(e, opts, cmd):
+ c = e.cfgs["BOXCMD"] + " " + opts + " -- " + cmd
+ e.log.verbose("Sandbox: %s\n" % c)
+ rc = os.system(c)
+ if rc > 1:
+ raise moe.MoeErr, "Sandbox failed"
+ return rc