def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractTool.tasks ''' # Create Folders yield super(AttestatorSelector, self).tasks(*args, **kwargs) # Process Files path, _ = self._outputs[0] src = toList(args[0]) dst = toList(join(path, 'interpreter.out')) yield { 'name': self._name(self._ACTION, src, '\ninto', dst), 'title': self._title, 'actions': [ CmdAction(self._cmd), ], 'params': [ { 'name': 'target', 'short': None, 'default': kwargs.get('target', 'linux'), }, ], 'file_dep': src, }
def test_toList(self): ''' Test toList function ''' self.assertEqual([], toList(None)) self.assertEqual(['str',], toList('str')) self.assertEqual([('one', 1),], toList(('one', 1))) self.assertEqual(['two', 2], toList(['two', 2]))
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractCmdTool.tasks ''' # Process Files srcs = toList(args[0]) dsts = toList(args[1]) yield {'name' : self._name(self._ACTION, srcs, '\ninto', dsts), 'title' : self._title, 'actions' : [self._python, ], 'params' : [{'name' : 'objdir', 'short' : None, 'default': kwargs.get('objdir', '.'), }, {'name' : 'stubdir', 'short' : None, 'default': kwargs.get('stubdir', '.'), }, {'name' : 'vmdir', 'short' : None, 'default': kwargs.get('vmdir', '.'), }, {'name' : 'annotfile', 'short' : None, 'default': srcs[0], }, {'name' : 'chunks_file', 'short' : None, 'default': kwargs.get('chunks_file', '.'), }, {'name' : 'binary', 'short' : None, 'default': srcs[1], }, {'name' : 'runtime_profiles', 'short' : None, 'default': kwargs.get('runtime_profiles', None), }, {'name' : 'runtime_profiles_obf', 'short' : None, 'default': kwargs.get('runtime_profiles_obf', None), }, {'name' : 'dst_object', 'short' : None, 'default': kwargs.get('dst_object', ''), }, ], 'targets' : dsts, 'file_dep': srcs, }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractCmdTool.tasks ''' # Create Folders yield super(DiabloObfuscator, self).tasks(*args, **kwargs) # Process Files srcs = toList(args[0]) dsts = toList(args[1]) yield {'name' : self._name(self._ACTION, srcs, '\ninto', dsts), 'title' : self._title, 'actions' : [CmdAction(self._cmd),], 'params' : [{'name' : 'objdir', 'short' : None, 'default': kwargs.get('objdir', '.'), }, {'name' : 'stubdir', 'short' : None, 'default': kwargs.get('stubdir', '.'), }, {'name' : 'vmdir', 'short' : None, 'default': kwargs.get('vmdir', '.'), }, {'name' : 'annotfile', 'short' : None, 'default': srcs[0], }, {'name' : 'chunks_file', 'short' : None, 'default': kwargs.get('chunks_file', '.'), }, {'name' : 'binary', 'short' : None, 'default': srcs[1], }, {'name' : 'runtime_profiles', 'short' : None, 'default': kwargs.get('runtime_profiles', None), }, {'name' : 'runtime_profiles_obf', 'short' : None, 'default': kwargs.get('runtime_profiles_obf', None), }, ], 'targets' : dsts, 'file_dep': srcs, }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractCmdTool.tasks ''' dst, _ = self._outputs[0] annotations_file = abspath(toList(args[0])[0]) yield {'name' : self._name(self._ACTION, annotations_file), 'title' : self._title, 'actions' : [self._python, ], 'params' : [{'name' : 'filter', 'short' : None, 'default': kwargs.get('filter', None), }, {'name' : 'keep_placeholders', 'short' : None, 'default': kwargs.get('keep_placeholders', False), }, {'name' : 'replace_all', 'short' : None, 'default': kwargs.get('replace_all', False), }, {'name' : 'preprocessed', 'short' : None, 'default': kwargs.get('preprocessed', False), }, ], 'targets' : [dst, ], 'file_dep': [annotations_file, ], }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractCmdTool.tasks ''' # Create Folders yield super(CodeSurferInitializer, self).tasks(*args, **kwargs) # Process Files preps = list() for arg in toList(args[0]): preps.extend(glob(abspath(arg))) # end for if (not preps): return # end if path, _ = self._outputs[0] prj = join(path, 'project.prj') yield {'name' : self._name(self._ACTION, preps, '\ninto', prj), 'title' : self._title, 'actions' : [CmdAction(self._cmd),], 'targets' : [prj,], 'file_dep': preps, }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractCmdTool.tasks ''' # Create Folders yield super(SplitterCodeTransformation, self).tasks(*args, **kwargs) # Process Files path, ext = self._outputs[0] for arg in toList(args[0]): for src in iglob(abspath(arg)): dst = join(path, basename(src) + ext) yield { 'name': self._name(self._ACTION, src, '\ninto', dst), 'title': self._title, 'actions': [ CmdAction(self._cmd), ], 'params': [ { 'name': 'fact_folder', 'short': None, 'default': kwargs.get('fact_folder'), }, { 'name': 'csurf_folder', 'short': None, 'default': kwargs.get('csurf_folder'), }, { 'name': 'client_folder', 'short': None, 'default': kwargs.get('client_folder'), }, { 'name': 'server_folder', 'short': None, 'default': kwargs.get('server_folder'), }, { 'name': 'log_folder', 'short': None, 'default': kwargs.get('log_folder'), }, ], 'targets': [ dst, ], 'file_dep': [ src, ], }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractTool.tasks ''' # Create Folders yield super(AnnotationMerger, self).tasks(*args, **kwargs) src = list() for arg in toList(args[0]): src.extend(glob(abspath(arg))) # end for dst = toList(args[1]) yield {'name' : self._name(self._ACTION, src, '\ninto', dst), 'title' : self._title, 'actions' : [self._python,], 'targets' : dst, 'file_dep': src, }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractPythonTool.tasks ''' # Create Folders yield super(WbcRenewabilityGenerator, self).tasks(*args, **kwargs) # Process Files path, _ = self._outputs[0] for arg in toList(args[0]): for src in iglob(abspath(arg)): if not getsize(src): continue # end if dst = join(path, "renew_" + basename(src).split('.', 1)[0] + ".sh") yield {'name' : self._name(self._ACTION, src, '\ninto', dst), 'title' : self._title, 'actions' : [self._python, ], 'params' : [{'name' : 'wbta_tool', 'short' : None, 'default': kwargs.get('wbta_tool', ''), }, {'name' : 'pre_opts', 'short' : None, 'default': kwargs.get('pre_opts', ''), }, {'name' : 'compile_opts', 'short' : None, 'default': kwargs.get('compile_opts', ''), }, {'name' : 'frontend', 'short' : None, 'default': kwargs.get('frontend', ''), }, {'name' : 'json_path', 'short' : None, 'default': kwargs.get('json_path', ''), }, {'name' : 'patch_tool', 'short' : None, 'default': kwargs.get('patch_tool', ''), }, ], 'targets' : [dst, ], 'file_dep': [src, ], }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractCmdTool.tasks ''' dst, _ = self._outputs[0] patch_file = abspath(toList(args[0])[0]) yield {'name' : self._name(self._ACTION, patch_file), 'title' : self._title, 'actions' : [CmdAction(self._cmd), ], 'targets' : [dst, ], 'file_dep': [patch_file, ], }
def tasks(self, *args, **kwargs): ''' @copydoc actc.tools.AbstractPythonTool.tasks ''' # Create Folders yield super(WbcHeaderIncluder, self).tasks(*args, **kwargs) # Process Files path, _ = self._outputs[0] for arg in toList(args[0]): for src in iglob(abspath(arg)): dst = join(path, basename(src).replace('client_headers_', '') \ .replace('.txt', '.h')) yield {'name' : self._name(self._ACTION, src, '\ninto', dst), 'title' : self._title, 'actions' : [self._python,], 'targets' : [dst,], 'file_dep': [src,], }