Skip to content

Commit

Permalink
ddlog: Make ovn-northd test use the Autotest infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpettit committed Dec 21, 2018
1 parent 439b5da commit 49cae42
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 8 deletions.
4 changes: 1 addition & 3 deletions ovn/northd/automake.mk
Expand Up @@ -8,9 +8,7 @@ ovn_northd_ovn_northd_LDADD = \
man_MANS += ovn/northd/ovn-northd.8
EXTRA_DIST += ovn/northd/ovn-northd.8.xml

EXTRA_DIST += ovn/northd/ovn_northd.dl ovn/northd/ovn.dl ovn/northd/ovn.rs \
ovn/northd/ovn_northd.dat ovn/northd/ovn_northd.dump.expected \
ovn/northd/test.sh
EXTRA_DIST += ovn/northd/ovn_northd.dl ovn/northd/ovn.dl ovn/northd/ovn.rs
CLEANFILES += ovn/northd/ovn-northd.8

if DDLOG
Expand Down
5 changes: 0 additions & 5 deletions ovn/northd/test.sh

This file was deleted.

6 changes: 6 additions & 0 deletions tests/atlocal.in
Expand Up @@ -231,3 +231,9 @@ export OVS_CTL_TIMEOUT
# matter break everything.
ASAN_OPTIONS=detect_leaks=0:abort_on_error=true:log_path=asan:$ASAN_OPTIONS
export ASAN_OPTIONS

# Check whether we should run ddlog tests.
DDLOG_LIB='@DDLOG_LIB@'
if test x"$DDLOG_LIB" != x; then
TEST_DDLOG="true"
fi
5 changes: 5 additions & 0 deletions tests/automake.mk
Expand Up @@ -25,6 +25,7 @@ TESTSUITE_AT = \
tests/testsuite.at \
tests/completion.at \
tests/checkpatch.at \
tests/ddlog.at \
tests/library.at \
tests/heap.at \
tests/bundle.at \
Expand Down Expand Up @@ -468,6 +469,10 @@ PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage

FLAKE8_PYFILES += $(CHECK_PYFILES)

if DDLOG
EXTRA_DIST += tests/ddlog/ovn_northd.dat tests/ddlog/ovn_northd.dump.expected
endif

if HAVE_OPENSSL
TESTPKI_FILES = \
tests/testpki-cacert.pem \
Expand Down
13 changes: 13 additions & 0 deletions tests/ddlog.at
@@ -0,0 +1,13 @@
AT_BANNER([ddlog])

AT_SETUP([ddlog -- northd])
AT_SKIP_IF([test "$TEST_DDLOG" != "true"])

DDLOG_TEST_DIR="$(cd $abs_top_builddir/tests/ddlog && pwd)"
DDLOG_CLI_DIR="$(cd $abs_top_builddir/ovn/northd/ovn_northd_ddlog/target/debug/ && pwd)"

cp $DDLOG_TEST_DIR/ovn_northd.dump.expected expout
AT_CHECK([$DDLOG_CLI_DIR/ovn_northd_cli < $DDLOG_TEST_DIR/ovn_northd.dat],
[0], [expout], [stderr])

AT_CLEANUP
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/testsuite.at
Expand Up @@ -24,6 +24,7 @@ m4_include([tests/completion.at])
m4_include([tests/checkpatch.at])
m4_include([tests/bfd.at])
m4_include([tests/cfm.at])
m4_include([tests/ddlog.at])
m4_include([tests/lacp.at])
m4_include([tests/library.at])
m4_include([tests/heap.at])
Expand Down

0 comments on commit 49cae42

Please sign in to comment.