Esempio n. 1
0
                who = 'Your'
            crashes.append(package + ' ' + who)

        if main_timeout or your_timeout:
            who = None
            if main_timeout and your_timeout:
                who = 'Both'
            elif main_timeout:
                who = 'Main'
            else:
                who = 'Your'
            timeouts.append(package + ' ' + who)

        with open(result_file, 'a') as myfile:
            myfile.write(package + '\n')
            diff = lib.diff_results('main', results_to_diff[0], 'your',
                                    results_to_diff[1])
            if diff != '':
                myfile.write('diff:\n' + diff + '\n')

        with open(timing_file, 'a') as myfile:
            myfile.write(
                '{:{package_width}} {:{timing_width}} {:{timing_width}} {:{timing_width}}\n'
                .format(package,
                        format_float(time_main),
                        format_float(time_your),
                        format_float(time_your, time_main),
                        package_width=package_width,
                        timing_width=timing_width))

        packages_processed += 1
        print(
Esempio n. 2
0
                your_crashed = True
        results_to_diff.append(errout)

        if master_crashed or your_crashed:
            who = None
            if master_crashed and your_crashed:
                who = 'Both'
            elif master_crashed:
                who = 'Master'
            else:
                who = 'Your'
            crashes.append(package + ' ' + who)

        with open(result_file, 'a') as myfile:
            myfile.write(package + '\n')
            diff = lib.diff_results(work_path, 'master', results_to_diff[0],
                                    'your', results_to_diff[1])
            if diff != '':
                myfile.write('diff:\n' + diff + '\n')

        packages_processed += 1
        print(
            str(packages_processed) + ' of ' + str(args.p) +
            ' packages processed\n')

    with open(result_file, 'a') as myfile:
        myfile.write('\n\ncrashes\n')
        myfile.write('\n'.join(crashes))

    print('Result saved to: ' + result_file)