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 # PY-CHECK is expanded before the check. It can check for features of the
21 # Python implementation that are required for the test to pass.
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])
28 AT_KEYWORDS([ovsdb positive Python $4])
29 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py $2], [0], [$3
33 # OVSDB_CHECK_POSITIVE_PY3(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ],
36 # Runs "test-ovsdb.py TEST-OVSDB-ARGS" and checks that it exits with
37 # status 0 and prints OUTPUT on stdout.
39 # PY-CHECK is expanded before the check. It can check for features of the
40 # Python implementation that are required for the test to pass.
42 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
43 m4_define([OVSDB_CHECK_POSITIVE_PY3],
45 AT_SKIP_IF([test $HAVE_PYTHON3 = no])
47 AT_KEYWORDS([ovsdb positive Python $4])
48 AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [0], [$3
52 # OVSDB_CHECK_POSITIVE_CPY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS],
53 # [PREREQ], [PY2-CHECK], [PY3-CHECK])
55 # Runs identical C and Python tests, as specified.
56 m4_define([OVSDB_CHECK_POSITIVE_CPY],
57 [OVSDB_CHECK_POSITIVE([$1 - C], [$2], [$3], [$4], [$5])
58 OVSDB_CHECK_POSITIVE_PY([$1 - Python2], [$2], [$3], [$4], [$5], [$6])
59 OVSDB_CHECK_POSITIVE_PY3([$1 - Python3], [$2], [$3], [$4], [$5], [$7])])
61 # OVSDB_CHECK_NEGATIVE(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],
68 AT_KEYWORDS([ovsdb negative $4])
69 AT_CHECK([test-ovsdb $2], [1], [], [stderr])
70 m4_assert(m4_len([$3]))
72 [if grep -F -e "AS_ESCAPE([$3])" stderr
78 [0], [ignore], [ignore])
81 # OVSDB_CHECK_NEGATIVE_PY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
83 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
84 # status 1 and that its output on stdout contains substring OUTPUT.
85 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
86 m4_define([OVSDB_CHECK_NEGATIVE_PY],
88 AT_SKIP_IF([test $HAVE_PYTHON = no])
89 AT_KEYWORDS([ovsdb negative $4])
90 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py $2], [1], [], [stderr])
91 m4_assert(m4_len([$3]))
93 [if grep -F -e "AS_ESCAPE([$3])" stderr
99 [0], [ignore], [ignore])
102 # OVSDB_CHECK_NEGATIVE_PY3(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
104 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
105 # status 1 and that its output on stdout contains substring OUTPUT.
106 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
107 m4_define([OVSDB_CHECK_NEGATIVE_PY],
109 AT_SKIP_IF([test $HAVE_PYTHON3 = no])
110 AT_KEYWORDS([ovsdb negative $4])
111 AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
112 m4_assert(m4_len([$3]))
114 [if grep -F -e "AS_ESCAPE([$3])" stderr
120 [0], [ignore], [ignore])
123 # OVSDB_CHECK_NEGATIVE_CPY(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS],
126 # Runs identical C and Python tests, as specified.
127 m4_define([OVSDB_CHECK_NEGATIVE_CPY],
128 [OVSDB_CHECK_NEGATIVE([$1 - C], [$2], [$3], [$4], [$5])
129 OVSDB_CHECK_NEGATIVE_PY([$1 - Python2], [$2], [$3], [$4], [$5])
130 OVSDB_CHECK_NEGATIVE_PY3([$1 - Python3], [$2], [$3], [$4], [$5])])
132 m4_include([tests/ovsdb-log.at])
133 m4_include([tests/ovsdb-types.at])
134 m4_include([tests/ovsdb-data.at])
135 m4_include([tests/ovsdb-column.at])
136 m4_include([tests/ovsdb-table.at])
137 m4_include([tests/ovsdb-row.at])
138 m4_include([tests/ovsdb-schema.at])
139 m4_include([tests/ovsdb-condition.at])
140 m4_include([tests/ovsdb-mutation.at])
141 m4_include([tests/ovsdb-query.at])
142 m4_include([tests/ovsdb-transaction.at])
143 m4_include([tests/ovsdb-execution.at])
144 m4_include([tests/ovsdb-trigger.at])
145 m4_include([tests/ovsdb-tool.at])
146 m4_include([tests/ovsdb-replication.at])
147 m4_include([tests/ovsdb-server.at])
148 m4_include([tests/ovsdb-monitor.at])
149 m4_include([tests/ovsdb-idl.at])
150 m4_include([tests/ovsdb-lock.at])
151 m4_include([tests/ovsdb-rbac.at])