]> git.proxmox.com Git - mirror_ovs.git/blob - tests/ovsdb.at
Rework and simplify the "lcov" support for the testsuite.
[mirror_ovs.git] / tests / ovsdb.at
1 # OVSDB_CHECK_POSITIVE(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
2 #
3 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
4 # status 0 and prints OUTPUT on stdout.
5 #
6 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS. If
7 # PREREQ is specified then the test is skipped if the Autoconf version
8 # is less than PREREQ.
9 m4_define([OVSDB_CHECK_POSITIVE],
10 [AT_SETUP([$1])
11 m4_if([$5], [], [],
12 [AT_XFAIL_IF([m4_version_prereq([$5], [false], [true])])])
13 AT_KEYWORDS([ovsdb positive $4])
14 AT_CHECK([test-ovsdb $2], [0], [$3
15 ], [])
16 AT_CLEANUP])
17
18 # OVSDB_CHECK_NEGATIVE(TITLE, TEST-OVSDB-ARGS, OUTPUT, [KEYWORDS], [PREREQ])
19 #
20 # Runs "test-ovsdb TEST-OVSDB-ARGS" and checks that it exits with
21 # status 1 and that its output on stdout contains substring OUTPUT.
22 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
23 m4_define([OVSDB_CHECK_NEGATIVE],
24 [AT_SETUP([$1])
25 AT_KEYWORDS([ovsdb negative $4])
26 AT_CHECK([test-ovsdb $2], [1], [], [stderr])
27 m4_assert(m4_len([$3]))
28 AT_CHECK(
29 [if grep -F -e "AS_ESCAPE([$3])" stderr
30 then
31 :
32 else
33 exit 99
34 fi],
35 [0], [ignore], [ignore])
36 AT_CLEANUP])
37
38 m4_include([tests/ovsdb-log.at])
39 m4_include([tests/ovsdb-types.at])
40 m4_include([tests/ovsdb-data.at])
41 m4_include([tests/ovsdb-column.at])
42 m4_include([tests/ovsdb-table.at])
43 m4_include([tests/ovsdb-row.at])
44 m4_include([tests/ovsdb-condition.at])
45 m4_include([tests/ovsdb-mutation.at])
46 m4_include([tests/ovsdb-query.at])
47 m4_include([tests/ovsdb-transaction.at])
48 m4_include([tests/ovsdb-execution.at])
49 m4_include([tests/ovsdb-trigger.at])
50 m4_include([tests/ovsdb-file.at])
51 m4_include([tests/ovsdb-server.at])
52 m4_include([tests/ovsdb-monitor.at])
53 m4_include([tests/ovsdb-idl.at])