示例#1
0
def main():
    options, args = parse_args()
    # Measure the total wall-time
    timer = Timer()
    # Load the configuration (from config.py file).
    config = Config(args)
    # Optionally import tests from the source tree.
    if options.do_import:
        import_main(config)
    # Parse the command line after the import to check the presence of the
    # selected inputs
    config.parse_args()
    # Initialize the working directory.
    work = Work(config)
    # Update the source code
    update_source(config)
    # Try to compile the program
    compile_program(config)
    # Create a test runner. It will produce a Makefile based on the #CPQA
    # directives in the test inputs. It runs the make file, logs some screen
    # output and collects all the test results in the attributes of the runner
    # object.
    runner = Runner(work)
    # Stop timer
    timer.stop()
    # Print a summary on screen
    log_txt(runner, timer, sys.stdout)
    # Create a text log file
    log_txt(runner, timer)
    # Create a html log file
    log_html(runner, timer)
示例#2
0
def main():
    options, args = parse_args()
    # Load the configuration (from config.py file and from command line args).
    config = Config(args, use_last=True)
    config.parse_args()
    # Get the list of failed tests during the last run
    different = get_different(config)
    if len(different) == 0:
        print "No outputs with different values found. Quiting."
        sys.exit(1)
    # Get the confirmation that this needs to be done.
    if not get_confirmation(different):
        sys.exit(1)
    # Request the motivation
    motivation = get_motivation(options)
    # Apply the reset
    do_reset(config, motivation, different)