Exemplo n.º 1
0
def xrunProcess(master, adapter_id, name, xe):
  p = process.XrunProcess(name, master, output_file="{name}.log".format(name=name), verbose=True)
  exe_name = base.exe_name('xrun')
  xrun = base.file_abspath(exe_name) # Windows requires the absolute path of xrun
  reactor.spawnProcess(p, xrun, [xrun, '--adapter-id', adapter_id, '--xscope-port', 'localhost:12346', xe],
    env=os.environ, )
  return p
Exemplo n.º 2
0
def startXrun(combined_args):
  (name, process, adapter_id, bin, args) = combined_args

  # Windows requires the absolute path of xrun
  exe_name = base.exe_name('xrun')
  xrun = base.file_abspath(exe_name)

  log_info("Starting %s (%s)" % (name, ' '.join(['--adapter-id', adapter_id, '--xscope', '--xscope-file',  name + '.xmt', bin])))
  reactor.spawnProcess(process, xrun, [xrun, '--adapter-id', adapter_id, '--xscope', '--xscope-file', name + '.xmt', bin],
      env=os.environ, path=args.logdir)
Exemplo n.º 3
0
def startAnalyzer(combined_args):
  (name, adapter_id, target_bin, analyzer_bin, target_process, analyzer_process, port, args) = combined_args

  # Windows requires the absolute path of xrun
  exe_name = base.exe_name('xrun')
  xrun = base.file_abspath(exe_name)

  log_info("Starting analyzer %s" % name)

  reactor.spawnProcess(target_process, xrun,
      [xrun, '--adapter-id', adapter_id, '--xscope-port', 'localhost:%d' % port, target_bin],
      env=os.environ, path=args.logdir)

  reactor.spawnProcess(analyzer_process, analyzer_bin, [analyzer_bin, '-p', '%d' % port],
      env=os.environ, path=args.logdir)
Exemplo n.º 4
0
import xmos.test.master
import xmos.test.base as base
import xmos.test.xmos_logging as xmos_logging
import xmos.test.generator as generator
from xmos.test.base import AllOf, OneOf, NoneOf, Sequence, Expected, getActiveProcesses
from xmos.test.xmos_logging import log_error, log_warning, log_info, log_debug

from actions import *
import sequences
import endpoints
import generators
import analyzers
import graph

# Assign the xrun variable used to start processes
exe_name = base.exe_name('xrun')
xrun = base.file_abspath(exe_name) # Windows requires the absolute path of xrun

def print_title(title):
    log_info("\n%s\n%s\n" % (title, '=' * len(title)))

def configure_analyzers():
  """ Ensure the analyzers have started properly and then configure their channel
      frequencies as specified in the test configuration file
  """
  analyzer_startup = [Expected(a, "connected to .*: %d" % analyzers.get_port(a), 15, critical=True)
                        for a in analyzers.get_all()]
  yield master.expect(AllOf(analyzer_startup))

  for (name,analyzer) in analyzers.get_all().iteritems():
    if analyzer['type'] != 'audio':