Beispiel #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
Beispiel #2
0
 def results_store(self):
     rs = ResultsStore()
     rs.set_info_text('Information text', 'some information text')
     rs.set_info_text('Next Information', 'some another information text')
     rs.set_patches_results(self.patches_data)
     rs.set_build_data('old', self.old_rpm_data)
     rs.set_build_data('new', self.new_rpm_data)
     return rs
Beispiel #3
0
 def setup(self):
     self.results_store = ResultsStore()
     self.results_store.set_info_text('Information text',
                                      'some information text')
     self.results_store.set_info_text('Next Information',
                                      'some another information text')
     self.results_store.set_patches_results(self.patches_data)
     self.results_store.set_build_data('old', self.old_rpm_data)
     self.results_store.set_build_data('new', self.new_rpm_data)
Beispiel #4
0
    def setup(self):
        super(TestOutputTool, self).setup()

        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': self.WORKING_DIR,
            'moved': ['/usr/sbin/test', '/usr/sbin/test2'],
        }

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

        self.results_file_path = os.path.join(self.WORKING_DIR, 'output_file')
Beispiel #5
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