コード例 #1
0
ファイル: utils.py プロジェクト: chakraroy/talkey
def find_executable(executable):
    '''
    Finds executable in PATH

    Returns:
        string or None
    '''
    logger = logging.getLogger(__name__)
    logger.debug("Checking executable '%s'...", executable)
    executable_path = _find_executable(executable)
    found = executable_path is not None
    if found:
        logger.debug("Executable '%s' found: '%s'", executable, executable_path)
    else:
        logger.debug("Executable '%s' not found", executable)
    return executable_path
コード例 #2
0
ファイル: utils.py プロジェクト: JCGit2018/talkey
def find_executable(executable):
    '''
    Finds executable in PATH

    Returns:
        string or None
    '''
    logger = logging.getLogger(__name__)
    logger.debug("Checking executable '%s'...", executable)
    executable_path = _find_executable(executable)
    found = executable_path is not None
    if found:
        logger.debug("Executable '%s' found: '%s'", executable,
                     executable_path)
    else:
        logger.debug("Executable '%s' not found", executable)
    return executable_path
コード例 #3
0
def find_executable(names):
    for possible in names:
        result = _find_executable(possible)
        if result is not None:
            return result
    return None
コード例 #4
0
def find_executable(names):
    for possible in names:
        result = _find_executable(possible)
        if result is not None:
            return result
    return None
コード例 #5
0
ファイル: __init__.py プロジェクト: haytham13713/pymtl
#-----------------------------------------------------------------------

from tools.simulation.SimulationTool import SimulationTool
from tools.translation.verilator_sim import TranslationTool
from tools.translation.cpp_sim       import get_cpp
from tools.integration.verilog       import VerilogModel

#-----------------------------------------------------------------------
# py.test decorators
#-----------------------------------------------------------------------

from pytest          import mark            as _mark
from distutils.spawn import find_executable as _find_executable
from os.path         import exists          as _exists

_has = lambda x: _find_executable( x ) != None

requires_xcc = _mark.skipif( not( _has('maven-gcc') and _has('maven-objdump') ),
                             reason='requires cross-compiler toolchain' )

requires_vmh = _mark.skipif( not _exists('../tests/build/vmh'),
                             reason='requires vmh files' )

requires_iverilog  = _mark.skipif( not( _has('iverilog') ),
                                   reason='requires iverilog' )

requires_verilator = _mark.skipif( not( _has('verilator') ),
                                   reason='requires verilator' )

#-----------------------------------------------------------------------
# pymtl namespace
コード例 #6
0
ファイル: __init__.py プロジェクト: nds64/pymtl
#-----------------------------------------------------------------------

from tools.simulation.SimulationTool import SimulationTool
from tools.translation.verilator_sim import TranslationTool
from tools.translation.cpp_sim import get_cpp
from tools.integration.verilog import VerilogModel

#-----------------------------------------------------------------------
# py.test decorators
#-----------------------------------------------------------------------

from pytest import mark as _mark
from distutils.spawn import find_executable as _find_executable
from os.path import exists as _exists

_has = lambda x: _find_executable(x) != None

requires_xcc = _mark.skipif(not (_has('maven-gcc') and _has('maven-objdump')),
                            reason='requires cross-compiler toolchain')

requires_vmh = _mark.skipif(not _exists('../tests/build/vmh'),
                            reason='requires vmh files')

requires_iverilog = _mark.skipif(not (_has('iverilog')),
                                 reason='requires iverilog')

requires_verilator = _mark.skipif(not (_has('verilator')),
                                  reason='requires verilator')

#-----------------------------------------------------------------------
# pymtl namespace