~canonical-platform-qa/auto-upgrade-testing/qemu-desktop

« back to all changes in this revision

Viewing changes to upgrade_testing/command_line.py

  • Committer: Christopher Lee
  • Date: 2015-11-05 03:40:52 UTC
  • Revision ID: chris.lee@canonical.com-20151105034052-0wecuu8fgqq9umba
Cleanup comments and method call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
    return full_path
161
161
 
162
162
 
163
 
def display_results(artifacts_directory):
164
 
    # Read in yaml results file and output results.
 
163
def display_results(output_dir):
 
164
    artifacts_directory = os.path.join(
 
165
        output_dir, 'artifacts', 'upgrade_run'
 
166
    )
 
167
    logger.info(
 
168
        'Results can be found here: {}'.format(artifacts_directory)
 
169
    )
 
170
 
165
171
    results_yaml = os.path.join(artifacts_directory, 'runner_results.yaml')
166
172
    with open(results_yaml, 'r') as f:
167
173
        results = yaml.safe_load(f)
293
299
        output_dir = get_output_dir(args)
294
300
 
295
301
        with prepare_test_environment(testsuite) as created_files:
296
 
            # Created files is a named tuple that contains:
297
 
            # run_config_file -> file containing details for the run
298
 
            # XXX output_directory ->  Path for output
299
 
            # testrun_tmp_dir -> tmp dir used for the run, can create files
300
 
            # here (i.e. debian/tests/)
301
 
            # Currently output dir is separate
302
302
            execute_adt_run(testsuite, backend, created_files, output_dir)
303
303
 
304
 
        artifacts_directory = os.path.join(
305
 
            output_dir, 'artifacts', 'upgrade_run'
306
 
        )
307
 
        logger.info(
308
 
            'Results can be found here: {}'.format(artifacts_directory)
309
 
        )
310
 
        display_results(artifacts_directory)
 
304
        display_results(output_dir)
311
305
 
312
306
 
313
307
if __name__ == '__main__':