• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2#
3# $SAI_INSTANCE_IDX - which instance of sai, 0+
4# $1 - background fixture name, unique within test space, like "multipostlocalserver"
5# $2 - executable
6# $3+ - args
7
8J=`basename $2`.$1.$SAI_INSTANCE_IDX
9$2 $3 $4 $5 $6 $7 $8 $9 2>/tmp/ctest-background-$J 1>/dev/null 0</dev/null &
10echo $! > /tmp/sai-ctest-$J
11# really we want to loop until the listen port is up
12# on, eg, rpi it can be blocked at sd card and slow to start
13# due to parallel tests and disc cache flush
14if [ ! -z "`echo $2 | grep valgrind`" ] ; then
15	sleep 5
16else
17	sleep 1
18fi
19exit 0
20
21