def main(): """ Main routine """ args = utils.get_args(sys.argv[1:]) action = sys.argv[1] if action == "sub": if not args.system: args.system = detect_scheduler() if not args.jobname: args.jobname = os.path.basename(args.cmdfile) core.phoenix_sub(args) elif action == "step": core.phoenix_step(args.directory, args.step, args.force_qc) elif action == "run": core.phoenix_run(args.directory, args.step, args.email_list) else: sys.exit("ERROR: Unknown action '{}'".format(action))
def test_successful_run_force_qc(self): directory = "data/phoenix_dirs/qc_fail_example" core.phoenix_run(directory, starting_step=1, force_qc=True)
def test_successful_run(self): directory = "data/phoenix_dirs/simple_example" core.phoenix_run(directory)
def test_fail_run_qc(self): directory = "data/phoenix_dirs/simple_example" os.remove(directory + "/*.tmp") os.remove(directory + "/*.out") os.remove(directory + "/*.err") core.phoenix_run(directory, starting_step=1)
def test_fail_run_strongarm(self): directory = "data/phoenix_dirs/yp1tkNml" core.phoenix_run(directory)
def test_bad_email_list(self): directory = "data/phoenix_dirs/yp1tkNml" core.phoenix_run(directory, email_list="*****@*****.**")
def test_bad_starting_step(self): directory = "data/phoenix_dirs/yp1tkNml" core.phoenix_run(directory, starting_step="foo")
def test_not_a_phoenix_dir(self): directory = "data/phoenix_dirs/yp1tkNml-pre" core.phoenix_run(directory)
def test_run_nodir(self): not_a_dir = "/path/to/blah" core.phoenix_run(not_a_dir)