Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
def find_executable(names):
    for possible in names:
        result = _find_executable(possible)
        if result is not None:
            return result
    return None
Exemplo n.º 4
0
def find_executable(names):
    for possible in names:
        result = _find_executable(possible)
        if result is not None:
            return result
    return None
Exemplo n.º 5
0
#-----------------------------------------------------------------------

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
Exemplo n.º 6
0
#-----------------------------------------------------------------------

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