예제 #1
0
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))
예제 #2
0
 def test_successful_run_force_qc(self):
     directory = "data/phoenix_dirs/qc_fail_example"
     core.phoenix_run(directory, starting_step=1, force_qc=True)
예제 #3
0
 def test_successful_run(self):
     directory = "data/phoenix_dirs/simple_example"
     core.phoenix_run(directory)
예제 #4
0
 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)
예제 #5
0
 def test_fail_run_strongarm(self):
     directory = "data/phoenix_dirs/yp1tkNml"
     core.phoenix_run(directory)
예제 #6
0
 def test_bad_email_list(self):
     directory = "data/phoenix_dirs/yp1tkNml"
     core.phoenix_run(directory, email_list="*****@*****.**")
예제 #7
0
 def test_bad_starting_step(self):
     directory = "data/phoenix_dirs/yp1tkNml"
     core.phoenix_run(directory, starting_step="foo")
예제 #8
0
 def test_not_a_phoenix_dir(self):
     directory = "data/phoenix_dirs/yp1tkNml-pre"
     core.phoenix_run(directory)
예제 #9
0
 def test_run_nodir(self):
     not_a_dir = "/path/to/blah"
     core.phoenix_run(not_a_dir)