X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fofproto-macros.at;h=24cb45a7dd9cfbeb23d0ce5fae5b85651cc3b1cf;hb=53319f95b9d3d025917110e2688a2cf0616f7071;hp=d5ff2ad6a0f89a3b32f6b4b11a3dab8da393b6e8;hpb=007948177581f3b3dad188221593d0e4bdca6ba0;p=sliver-openvswitch.git diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index d5ff2ad6a..24cb45a7d 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -1,16 +1,23 @@ m4_define([STRIP_XIDS], [[sed 's/ (xid=0x[0-9a-fA-F]*)//']]) m4_define([STRIP_DURATION], [[sed 's/\bduration=[0-9.]*s/duration=?s/']]) +m4_define([TESTABLE_LOG], [-vPATTERN:ANY:'%c|%p|%m']) m4_define([OFPROTO_START], [OVS_RUNDIR=$PWD; export OVS_RUNDIR OVS_LOGDIR=$PWD; export OVS_LOGDIR - trap 'kill `cat ovs-openflowd.pid`' 0 - AT_CAPTURE_FILE([ovs-openflowd.log]) + trap 'kill `cat test-openflowd.pid`' 0 + AT_CAPTURE_FILE([test-openflowd.log]) AT_CHECK( - [ovs-openflowd --detach --pidfile --enable-dummy --log-file --fail=closed dummy@br0 none --datapath-id=fedcba9876543210 $1], - [0], [ignore], [ignore]) + [test-openflowd --detach --pidfile --enable-dummy --log-file --fail=closed dummy@br0 none --datapath-id=fedcba9876543210 $1], + [0], [], [stderr]) + AT_CHECK([[sed < stderr ' +/vlog|INFO|opened log file/d +/openflowd|INFO|Open vSwitch version/d +/openflowd|INFO|OpenFlow protocol version/d +/ofproto|INFO|using datapath ID/d +/ofproto|INFO|datapath ID changed to fedcba9876543210/d']]) ]) m4_define([OFPROTO_STOP], - [AT_CHECK([ovs-appctl -t ovs-openflowd exit]) + [AT_CHECK([ovs-appctl -t test-openflowd exit]) trap '' 0])