コード例 #1
0
    def run(self, cfg, flags, args):
        if len(args) < 2:
            raise target.ArgError()
        
        input_file = args[0]
        ifaces = args[1:]
        output_file = target.flag(flags, '-o')        

        return driver.previrt(input_file, output_file, 
                              ['-Poccam'] + 
                              driver.all_args('-Poccam-input', ifaces))
コード例 #2
0
ファイル: watch.py プロジェクト: sunlifeng/OCCAM
    def run(self, cfg, flags, args):
        if len(args) < 2:
            raise ArgError()

        input_file = args[0]
        interfaces = args[1:]
        output_file = target.flag(flags, '-o')
        if output_file is None:
            raise ArgError()

        return driver.previrt(input_file, output_file, ['-Pwatch2'] +
                              driver.all_args('-Pwatch2-input', interfaces))
コード例 #3
0
    def run(self, cfg, flags, args):
        if len(args) < 2:
            raise ArgError()

        input_file = args[0]
        interfaces = args[1:]
        output_file = target.flag(flags, '-o')
        if output_file is None:
            raise ArgError()
                
        return driver.previrt(input_file, output_file, 
                              ['-Pwatch2'] + 
                              driver.all_args('-Pwatch2-input',
                                              interfaces))
コード例 #4
0
    def run(self, cfg, flags, args):
        input_file = args[0]
        interfaces = args[1:]
        output_file = target.flag(flags, 'o')
        if output_file is None:
            raise ArgError()

        inF = ('--in', '') in flags
        outF = ('--out', '') in flags
        if inF and outF:
            raise ArgError()
        elif inF:
            tool = '-Penforce-inside'
        elif outF:
            tool = '-Penforce-outside'
        else:
            raise ArgError()

        return driver.previrt(input_file, output_file, [tool] +
                              driver.all_args('%s-input' % tool, interfaces))
コード例 #5
0
    def run(self, cfg, flags, args):
        input_file = args[0]
        interfaces = args[1:]
        output_file = target.flag(flags, 'o')
        if output_file is None:
            raise ArgError()

        inF = ('--in', '') in flags
        outF = ('--out', '') in flags
        if inF and outF:
            raise ArgError()
        elif inF:
            tool = '-Penforce-inside'
        elif outF:
            tool = '-Penforce-outside'
        else:
            raise ArgError()
                
        return driver.previrt(input_file, output_file, 
                              [tool] + 
                              driver.all_args('%s-input' % tool,
                                              interfaces))