Package schrodinger :: Package test :: Package scival :: Module controller
[hide private]
[frames] | no frames]

Module controller

Main controller for running jobs

Classes [hide private]
  _KillOnError
Context manager to kill all jobs in a jobdj if an error is encountered.
Functions [hide private]
 
add_file_handler(logger, out_file, format='%(message)s')
Add a file handler to an existing logger.
 
get_parser_subparser()
Parse the provided arguments, returning a tuple of optparse.Values and a list of arguments.
 
parse_run_args(args, parser)
Parse the args from the parser and validate that the run command was used.
 
get_parser_command(args)
Gets the command used on the CLI for the argparser.
 
get_parser_args_command(parser=None, argv=None)
Parse the parser and return args.
 
get_suite(run_env, args, last_stage, add_connected=False, **kwargs)
Get a JobDJ loaded with the needed jobs from a specific suite.
 
get_suite_jobs(run_env, args, last_stage, **kwargs)
Get tests for a suite.
 
run_suite(jobdj, add_results=False, kill_on_error=True)
Run all the jobs added to a jobdj object.
 
_run_suite(jobdj, add_results)
Just run jobdj to completion, reporting results if needed.
 
run_main(schrodinger, args, last_stage, **kwargs)
Functionality for the run command
 
main(last_stage, **kwargs)
Variables [hide private]
  _logger = log.get_logger("scivalclient.controller")
  USERNAME = 'buildbot'
  DEBUG = False
hash(x)
  COMMANDS = {'build': ['mmshare_version', 'description', 'devel...
  __package__ = 'schrodinger.test.scival'
Function Details [hide private]

add_file_handler(logger, out_file, format='%(message)s')

 

Add a file handler to an existing logger.

Parameters:
  • logger - A logger object.
  • out_file - Name of the file to write to.
  • format - Format string for the logging Formatter.

parse_run_args(args, parser)

 

Parse the args from the parser and validate that the run command was used. Then correctly set the args up.

get_parser_args_command(parser=None, argv=None)

 

Parse the parser and return args. If there is no parser one will be created using argv.

run_suite(jobdj, add_results=False, kill_on_error=True)

 

Run all the jobs added to a jobdj object. If add_results is False the results will not be added to the database. If kill_on_error is True, will kill all jobs in the JobDJ in the event of a crash or interruption.


Variables Details [hide private]

COMMANDS

Value:
{'build': ['mmshare_version', 'description', 'developer'],
 'run': ['add_results', 'exec_dir', 'host', 'ignore_running']}