dnl an ovsdb-server on it for ovs-vsctl to connect to.
m4_define([OVS_VSCTL_SETUP],
[OVS_CHECK_LCOV(
- [ovsdb-tool create db $abs_builddir/../vswitchd/vswitch-idl.ovsschema],
+ [SCHEMA=$abs_top_builddir/vswitchd/vswitch-idl.ovsschema
+ if test ! -e $SCHEMA; then
+ SCHEMA=$abs_top_srcdir/vswitchd/vswitch-idl.ovsschema
+ if test ! -e $SCHEMA; then
+ echo 'Failed to find vswitch-idl.ovsschema'
+ exit 1
+ fi
+ fi
+ ovsdb-tool create db $SCHEMA],
[0], [stdout], [ignore])
OVS_CHECK_LCOV(
[[ovsdb-tool transact db \
m4_define([OVSDB_CHECK_IDL],
[AT_SETUP([$1])
AT_KEYWORDS([ovsdb server idl positive $5])
- OVS_CHECK_LCOV([ovsdb-tool create db $abs_builddir/idltest.ovsschema],
- [0], [stdout], [ignore])
+ OVS_CHECK_LCOV(
+ [SCHEMA=$abs_builddir/idltest.ovsschema
+ if test ! -e $SCHEMA; then
+ SCHEMA=$abs_srcdir/idltest.ovsschema
+ if test ! -e $SCHEMA; then
+ echo 'Failed to find idltest.ovsschema'
+ exit 1
+ fi
+ fi
+ ovsdb-tool create db $SCHEMA],
+ [0], [stdout], [ignore])
AT_CHECK([ovsdb-server '-vPATTERN:console:ovsdb-server|%c|%m' --detach --pidfile=$PWD/server-pid --listen=punix:socket --unixctl=$PWD/unixctl db], [0], [ignore], [ignore])
m4_if([$2], [], [],
[OVS_CHECK_LCOV([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat server-pid`])])