summaryrefslogtreecommitdiff
path: root/tests/ovs-vsctl.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-12-17 15:49:48 -0800
committerBen Pfaff <blp@nicira.com>2009-12-17 15:50:01 -0800
commit8419883d698965962e37b024cfb7f2f0ccba376f (patch)
tree29982cd58879a92a355fef007dcb897c784ab4ca /tests/ovs-vsctl.at
parent5562d6f55e762ea6783a9f6032e85ccb2824773f (diff)
downloadopenvswitch-8419883d698965962e37b024cfb7f2f0ccba376f.tar.gz
testsuite: Look for .ovsschema files in source dir as well as build dir.
When a distribution is built with "make dist", the .ovsschema files are included as part of it, so that the builder does not have to have Python installed. However in that case the distributed .ovsschema files are in the source dir instead of the build dir. The testsuite always expected them in the latter directory. This commit makes it look for them in both places.
Diffstat (limited to 'tests/ovs-vsctl.at')
-rw-r--r--tests/ovs-vsctl.at10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at
index b1e794849..6e968f060 100644
--- a/tests/ovs-vsctl.at
+++ b/tests/ovs-vsctl.at
@@ -4,7 +4,15 @@ 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(
- [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 \