1 m4_define([STRIP_XIDS], [[sed 's/ (xid=0x[0-9a-fA-F]*)//']])
2 m4_define([STRIP_DURATION], [[sed 's/\bduration=[0-9.]*s/duration=?s/']])
3 m4_define([TESTABLE_LOG], [-vPATTERN:ANY:'%c|%p|%m'])
5 m4_define([OFPROTO_START],
6 [OVS_RUNDIR=$PWD; export OVS_RUNDIR
7 OVS_LOGDIR=$PWD; export OVS_LOGDIR
8 trap 'kill `cat test-openflowd.pid`' 0
9 AT_CAPTURE_FILE([test-openflowd.log])
11 [test-openflowd --detach --pidfile --enable-dummy --log-file --fail=closed dummy@br0 none --datapath-id=fedcba9876543210 $1],
13 AT_CHECK([[sed < stderr '
14 /vlog|INFO|opened log file/d
15 /openflowd|INFO|Open vSwitch version/d
16 /openflowd|INFO|OpenFlow protocol version/d
17 /ofproto|INFO|using datapath ID/d
18 /ofproto|INFO|datapath ID changed to fedcba9876543210/d']])
21 m4_define([OFPROTO_STOP],
22 [AT_CHECK([ovs-appctl -t test-openflowd exit])