New tests in upcoming commits will use this.
$(srcdir)/tests/testsuite
TESTSUITE_AT = \
tests/testsuite.at \
+ tests/ovsdb-macros.at \
tests/lcov-pre.at \
tests/library.at \
tests/vconn.at \
dnl Creates an empty database in the current directory and then starts
dnl an ovsdb-server on it for ovs-vsctl to connect to.
m4_define([OVS_VSCTL_SETUP],
- [OVS_CHECK_LCOV(
- [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 \
- '[{"op": "insert",
- "table": "Open_vSwitch",
- "row": {}}]']],
- [0], [ignore], [ignore])
+ [OVSDB_INIT([db])
AT_CHECK([ovsdb-server --detach --pidfile=$PWD/pid --remote=punix:socket --unixctl=$PWD/unixctl db >/dev/null 2>&1], [0], [ignore], [ignore])])
dnl OVS_VSCTL_CLEANUP
--- /dev/null
+dnl OVSDB_INIT([$1])
+dnl
+dnl Creates an empty database named $1.
+m4_define([OVSDB_INIT],
+ [OVS_CHECK_LCOV(
+ [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 $1 $SCHEMA],
+ [0], [stdout], [ignore])
+ OVS_CHECK_LCOV(
+ [[ovsdb-tool transact $1 \
+ '[{"op": "insert",
+ "table": "Open_vSwitch",
+ "row": {}}]']],
+ [0], [ignore], [ignore])])
done
exit 1], [0], [ignore], [ignore])])
+m4_include([tests/ovsdb-macros.at])
m4_include([tests/lcov-pre.at])
+
m4_include([tests/library.at])
m4_include([tests/vconn.at])
m4_include([tests/dir_name.at])
m4_include([tests/ovsdb.at])
m4_include([tests/stp.at])
m4_include([tests/ovs-vsctl.at])
+
m4_include([tests/lcov-post.at])