diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-09-27 18:28:08 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-10-15 10:22:53 -0700 |
commit | e06d06a7b3386cd7a60fae1b77ae0acedf42c3e3 (patch) | |
tree | 5c3f422c6ef6ce2dc887af92558d9aef82c038bd /tests/ovsdb-idl.at | |
parent | 67656b9ff297f305b3bfcca2868e8e870e108283 (diff) | |
download | openvswitch-e06d06a7b3386cd7a60fae1b77ae0acedf42c3e3.tar.gz |
python/ovs/stream: teach stream.py tcp socket
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests/ovsdb-idl.at')
-rw-r--r-- | tests/ovsdb-idl.at | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index f4ed27e02..ce220107a 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -48,9 +48,29 @@ m4_define([OVSDB_CHECK_IDL_PY], OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) +# same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp +m4_define([OVSDB_CHECK_IDL_TCP_PY], + [AT_SETUP([$1 - Python tcp]) + AT_SKIP_IF([test $HAVE_PYTHON = no]) + AT_KEYWORDS([ovsdb server idl positive Python with tcp socket $5]) + AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema], + [0], [stdout], [ignore]) + AT_CHECK([perl $srcdir/choose-port.pl], [0], [stdout]) + TCP_PORT=`cat stdout` + AT_CHECK([ovsdb-server '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=ptcp:$TCP_PORT:127.0.0.1 --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore]) + m4_if([$2], [], [], + [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore], [kill `cat pid`])]) + AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema tcp:127.0.0.1:$TCP_PORT $3], + [0], [stdout], [ignore], [kill `cat pid`]) + AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]), + [0], [$4], [], [kill `cat pid`]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + m4_define([OVSDB_CHECK_IDL], [OVSDB_CHECK_IDL_C($@) - OVSDB_CHECK_IDL_PY($@)]) + OVSDB_CHECK_IDL_PY($@) + OVSDB_CHECK_IDL_TCP_PY($@)]) OVSDB_CHECK_IDL([simple idl, initially empty, no ops], [], |