1 # OVSDB_CHECK_POSITIVE(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
3 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
4 # status 0 and prints OUTPUT on stdout.
6 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
7 m4_define([OVSDB_CHECK_POSITIVE],
9 AT_KEYWORDS([ovsdb positive $4])
10 AT_CHECK([test-ovsdb $2], [0], [$3
14 # OVSDB_CHECK_POSITIVE_PY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ],
17 # Runs "test-ovsdb.py TEST-OVSDB-ARGS" and checks that it exits with
18 # status 0 and prints OUTPUT on stdout.
20 # If XFAIL is nonempty then the test is expected to fail (presumably because
21 # this test works in the C implementation but does not work in Python yet)
23 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
24 m4_define([OVSDB_CHECK_POSITIVE_PY],
26 AT_SKIP_IF([test $HAVE_PYTHON = no])
27 m4_if([$6], [], [], [AT_XFAIL_IF([:])])
28 AT_KEYWORDS([ovsdb positive Python $4])
29 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py $2], [0], [$3
33 # OVSDB_CHECK_POSITIVE_CPY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS],
34 # [PREREQ], [PY-XFAIL])
36 # Runs identical C and Python tests, as specified.
37 m4_define([OVSDB_CHECK_POSITIVE_CPY],
38 [OVSDB_CHECK_POSITIVE([$1 - C], [$2], [$3], [$4], [$5])
39 OVSDB_CHECK_POSITIVE_PY([$1 - Python], [$2], [$3], [$4], [$5], [$6])])
41 # OVSDB_CHECK_NEGATIVE(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
43 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
44 # status 1 and that its output on stdout contains substring OUTPUT.
45 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
46 m4_define([OVSDB_CHECK_NEGATIVE],
48 AT_KEYWORDS([ovsdb negative $4])
49 AT_CHECK([test-ovsdb $2], [1], [], [stderr])
50 m4_assert(m4_len([$3]))
52 [if grep -F -e "AS_ESCAPE([$3])" stderr
58 [0], [ignore], [ignore])
61 # OVSDB_CHECK_NEGATIVE_PY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
63 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
64 # status 1 and that its output on stdout contains substring OUTPUT.
65 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
66 m4_define([OVSDB_CHECK_NEGATIVE_PY],
68 AT_SKIP_IF([test $HAVE_PYTHON = no])
69 AT_KEYWORDS([ovsdb negative $4])
70 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py $2], [1], [], [stderr])
71 m4_assert(m4_len([$3]))
73 [if grep -F -e "AS_ESCAPE([$3])" stderr
79 [0], [ignore], [ignore])
82 # OVSDB_CHECK_NEGATIVE_CPY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS],
85 # Runs identical C and Python tests, as specified.
86 m4_define([OVSDB_CHECK_NEGATIVE_CPY],
87 [OVSDB_CHECK_NEGATIVE([$1 - C], [$2], [$3], [$4], [$5])
88 OVSDB_CHECK_NEGATIVE_PY([$1 - Python], [$2], [$3], [$4], [$5])])
90 m4_include([tests/ovsdb-log.at])
91 m4_include([tests/ovsdb-types.at])
92 m4_include([tests/ovsdb-data.at])
93 m4_include([tests/ovsdb-column.at])
94 m4_include([tests/ovsdb-table.at])
95 m4_include([tests/ovsdb-row.at])
96 m4_include([tests/ovsdb-schema.at])
97 m4_include([tests/ovsdb-condition.at])
98 m4_include([tests/ovsdb-mutation.at])
99 m4_include([tests/ovsdb-query.at])
100 m4_include([tests/ovsdb-transaction.at])
101 m4_include([tests/ovsdb-execution.at])
102 m4_include([tests/ovsdb-trigger.at])
103 m4_include([tests/ovsdb-tool.at])
104 m4_include([tests/ovsdb-server.at])
105 m4_include([tests/ovsdb-monitor.at])
106 m4_include([tests/ovsdb-idl.at])
107 m4_include([tests/ovsdb-idl-py.at])