Exemplo n.º 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))
Exemplo n.º 2
0
 def test_simple_step_outfiles(self):
     directory = "data/phoenix_dirs/simple_example"
     return_code = core.phoenix_step(directory, 0,
         outfile=directory+"/STEP-00.out",
         errfile=directory+"/STEP-00.err")
     self.assertEqual(return_code, 0)
Exemplo n.º 3
0
 def test_simple_step(self):
     directory = "data/phoenix_dirs/simple_example"
     return_code = core.phoenix_step(directory, 0)
     self.assertEqual(return_code, 0)
Exemplo n.º 4
0
 def test_fail_step(self):
     directory = "data/phoenix_dirs/yp1tkNml/workspace"
     return_code = core.phoenix_step(directory, 1)
     self.assertEqual(return_code, 1)
Exemplo n.º 5
0
 def test_not_a_phoenix_dir(self):
     directory = "data/phoenix_dirs/yp1tkNml-pre"
     core.phoenix_step(directory, 1)
Exemplo n.º 6
0
 def test_run_nodir(self):
     not_a_dir = "/path/to/blah"
     core.phoenix_step(not_a_dir, 1)