예제 #1
0
    def results_store(self, workdir):
        data = {'old': {'patches_full': {0: ['mytest.patch', '-p1', 0],
                                         1: ['mytest2.patch', '-p1', 1]},
                        'srpm': './test-1.2.0-1.src.rpm',
                        'rpm': ['./test-1.2.0-1.x86_64.rpm', './test-devel-1.2.0-1.x86_64.rpm'],
                        'logs': ['logfile1.log', 'logfile2.log']
                        },
                'new': {'patches_full': {0: ['mytest.patch', 0, '-p1'],
                                         1: ['mytest2.patch', 1, '-p1']},
                        'srpm': './test-1.2.2-1.src.rpm',
                        'rpm': ['./test-1.2.2-1.x86_64.rpm', './test-devel-1.2.2-1.x86_64.rpm'],
                        'logs': ['logfile3.log', 'logfile4.log']},
                'patches': {'deleted': ['mytest2.patch']},
                'results_dir': workdir,
                'moved': ['/usr/sbin/test', '/usr/sbin/test2'],
                'success': 'Success',
                }

        rs = ResultsStore()
        rs.set_build_data('old', data['old'])
        rs.set_build_data('new', data['new'])
        rs.set_patches_results(data['patches'])
        rs.set_checker_output('pkgdiff', {'path': 'rebase-helper-results/checkers/pkgdiff'})
        files_build_log_hook_result = {
            'removed': {'%files': ['README']}
        }
        rs.set_build_log_hooks_result('files', files_build_log_hook_result)
        rs.set_info_text('Information text', 'some information text')
        rs.set_info_text('Next Information', 'some another information text')
        rs.set_result_message('success', data['success'])

        return rs
예제 #2
0
    def results_store(self, workdir):
        data = {
            'old': {
                'patches_full': {
                    0: ['mytest.patch', '-p1', 0],
                    1: ['mytest2.patch', '-p1', 1]
                },
                'srpm':
                './test-1.2.0-1.src.rpm',
                'rpm': [
                    './test-1.2.0-1.x86_64.rpm',
                    './test-devel-1.2.0-1.x86_64.rpm'
                ],
                'logs': ['logfile1.log', 'logfile2.log']
            },
            'new': {
                'patches_full': {
                    0: ['mytest.patch', 0, '-p1'],
                    1: ['mytest2.patch', 1, '-p1']
                },
                'srpm':
                './test-1.2.2-1.src.rpm',
                'rpm': [
                    './test-1.2.2-1.x86_64.rpm',
                    './test-devel-1.2.2-1.x86_64.rpm'
                ],
                'logs': ['logfile3.log', 'logfile4.log']
            },
            'patches': {
                'deleted': ['mytest2.patch']
            },
            'results_dir': workdir,
            'moved': ['/usr/sbin/test', '/usr/sbin/test2'],
            'success': 'Success',
        }

        rs = ResultsStore()
        rs.set_build_data('old', data['old'])
        rs.set_build_data('new', data['new'])
        rs.set_patches_results(data['patches'])
        message = 'Following files were moved\n%s\n' % '\n'.join(data['moved'])
        test_output = {'pkgdiff': message}
        rs.set_checker_output('Results from checker(s)', test_output)
        rs.set_info_text('Information text', 'some information text')
        rs.set_info_text('Next Information', 'some another information text')
        rs.set_result_message('success', data['success'])

        return rs