예제 #1
0
 def test_failed_updated_due_to_modified_binary(self):
     mod1_mtime = file_modification_timestamp(self.get_test_data_path('binaries/mod1.so'))
     mod2_mtime = file_modification_timestamp(self.get_test_data_path('binaries/mod2.so'))
     state = {
         'sdk_skeletons': {
             'mod1': {
                 'gen_version': '0.1',
                 'bin_mtime': mod1_mtime,
                 'status': 'FAILED',
             },
             'mod2': {
                 'gen_version': '0.1',
                 # generated for a binary modified ten seconds before its current state
                 'bin_mtime': mod2_mtime - 10,
                 'status': 'FAILED'
             }
         }
     }
     self.check_generator_output(input=json.dumps(state),
                                 custom_required_gen=True,
                                 gen_version='0.1')
예제 #2
0
 def test_failed_skeleton_skipped(self):
     mod_mtime = file_modification_timestamp(self.get_test_data_path('binaries/mod.so'))
     state = {
         'sdk_skeletons': {
             'mod': {
                 'gen_version': '0.1',
                 'status': 'FAILED',
                 'bin_mtime': mod_mtime
             }
         }
     }
     self.check_generator_output(extra_args=['--state-file-policy', 'readwrite', '--name-pattern', 'mod'],
                                 gen_version='0.1',
                                 custom_required_gen=True,
                                 input=json.dumps(state))