X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fofproto-macros.at;h=24cb45a7dd9cfbeb23d0ce5fae5b85651cc3b1cf;hb=e7ed3a3a5f87d20f0cc632ae23adba6f30a4e19d;hp=06f9b65f698fcdf059322efbcb532a24427a9d6c;hpb=0fbc9f11c027cce9c89de12525de852e6b2ae332;p=openvswitch diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 06f9b65f..24cb45a7 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 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])