mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 05:27:47 +00:00
tests: fix & run ZeroMQ test
add reference output & run the test with proper libs and such. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
a0b974def7
commit
35b416fde2
@ -119,6 +119,7 @@ lib_test_timer_performance_SOURCES = lib/test_timer_performance.c \
|
|||||||
helpers/c/prng.c
|
helpers/c/prng.c
|
||||||
lib_test_ttable_SOURCES = lib/test_ttable.c
|
lib_test_ttable_SOURCES = lib/test_ttable.c
|
||||||
lib_test_zmq_SOURCES = lib/test_zmq.c
|
lib_test_zmq_SOURCES = lib/test_zmq.c
|
||||||
|
lib_test_zmq_CFLAGS = $(AM_CFLAGS) $(ZEROMQ_CFLAGS)
|
||||||
lib_cli_test_cli_SOURCES = lib/cli/test_cli.c lib/cli/common_cli.c
|
lib_cli_test_cli_SOURCES = lib/cli/test_cli.c lib/cli/common_cli.c
|
||||||
lib_cli_test_commands_SOURCES = lib/cli/test_commands_defun.c \
|
lib_cli_test_commands_SOURCES = lib/cli/test_commands_defun.c \
|
||||||
lib/cli/test_commands.c \
|
lib/cli/test_commands.c \
|
||||||
@ -154,7 +155,7 @@ lib_test_table_LDADD = $(ALL_TESTS_LDADD) -lm
|
|||||||
lib_test_timer_correctness_LDADD = $(ALL_TESTS_LDADD)
|
lib_test_timer_correctness_LDADD = $(ALL_TESTS_LDADD)
|
||||||
lib_test_timer_performance_LDADD = $(ALL_TESTS_LDADD)
|
lib_test_timer_performance_LDADD = $(ALL_TESTS_LDADD)
|
||||||
lib_test_ttable_LDADD = $(ALL_TESTS_LDADD)
|
lib_test_ttable_LDADD = $(ALL_TESTS_LDADD)
|
||||||
lib_test_zmq_LDADD = $(ALL_TESTS_LDADD) ../lib/libfrrzmq.la
|
lib_test_zmq_LDADD = ../lib/libfrrzmq.la $(ALL_TESTS_LDADD) $(ZEROMQ_LIBS)
|
||||||
lib_cli_test_cli_LDADD = $(ALL_TESTS_LDADD)
|
lib_cli_test_cli_LDADD = $(ALL_TESTS_LDADD)
|
||||||
lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD)
|
lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD)
|
||||||
bgpd_test_aspath_LDADD = $(BGP_TEST_LDADD)
|
bgpd_test_aspath_LDADD = $(BGP_TEST_LDADD)
|
||||||
|
@ -8,4 +8,4 @@ class TestCommands(frrtest.TestRefOut):
|
|||||||
@pytest.mark.skipif('QUAGGA_TEST_COMMANDS' not in os.environ,
|
@pytest.mark.skipif('QUAGGA_TEST_COMMANDS' not in os.environ,
|
||||||
reason='QUAGGA_TEST_COMMANDS not set')
|
reason='QUAGGA_TEST_COMMANDS not set')
|
||||||
def test_refout(self):
|
def test_refout(self):
|
||||||
return super(TestCommands, self).test_refout(self)
|
return super(TestCommands, self).test_refout()
|
||||||
|
11
tests/lib/test_zmq.py
Normal file
11
tests/lib/test_zmq.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import frrtest
|
||||||
|
import pytest
|
||||||
|
import os
|
||||||
|
|
||||||
|
class TestZMQ(frrtest.TestRefOut):
|
||||||
|
program = './test_zmq'
|
||||||
|
|
||||||
|
@pytest.mark.skipif('S["ZEROMQ_TRUE"]=""\n' not in open('../config.status').readlines(),
|
||||||
|
reason='ZEROMQ not enabled')
|
||||||
|
def test_refout(self):
|
||||||
|
return super(TestZMQ, self).test_refout()
|
50
tests/lib/test_zmq.refout
Normal file
50
tests/lib/test_zmq.refout
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
client send: msg #0 abc
|
||||||
|
server recv: msg #0 abc
|
||||||
|
client recv: MSG #0 ABC
|
||||||
|
client send: msg #1 bcd
|
||||||
|
server recv: msg #1 bcd
|
||||||
|
client recv: MSG #1 BCD
|
||||||
|
client send: msg #2 cde
|
||||||
|
server recv: msg #2 cde
|
||||||
|
client recv: MSG #2 CDE
|
||||||
|
client send: msg #3 def
|
||||||
|
server recv: msg #3 def
|
||||||
|
client recv: MSG #3 DEF
|
||||||
|
client send: msg #4 efg
|
||||||
|
server recv part 0 (more: 0): msg #4 efg
|
||||||
|
client recv: MSG #4 EFG
|
||||||
|
client send: msg #5 fgh
|
||||||
|
client recv: msg# was 0
|
||||||
|
client send: msg #6 ghi
|
||||||
|
server recv part 0 (more: 0): msg #6 ghi
|
||||||
|
client recv: MSG #6 GHI
|
||||||
|
client send: msg #7 hij
|
||||||
|
client recv: msg# was 0
|
||||||
|
---
|
||||||
|
client send: part 1/2
|
||||||
|
client send: part 2/2
|
||||||
|
server recv part 0 (more: 1): part 1/2
|
||||||
|
server recv part 1 (more: 0): part 2/2
|
||||||
|
client recv (more: 1): PART 2/2
|
||||||
|
client recv (more: 0): msg# was 1
|
||||||
|
---
|
||||||
|
client send: part 1/3
|
||||||
|
client send: part 2/3
|
||||||
|
client send: part 3/3
|
||||||
|
server recv part 0 (more: 1): part 1/3
|
||||||
|
server recv part 1 (more: 1): part 2/3
|
||||||
|
server recv part 2 (more: 0): part 3/3
|
||||||
|
client recv (more: 1): PART 3/3
|
||||||
|
client recv (more: 0): msg# was 2
|
||||||
|
---
|
||||||
|
client send: part 1/4
|
||||||
|
client send: part 2/4
|
||||||
|
client send: part 3/4
|
||||||
|
client send: part 4/4
|
||||||
|
server recv part 0 (more: 1): part 1/4
|
||||||
|
server recv part 1 (more: 1): part 2/4
|
||||||
|
server recv part 2 (more: 1): part 3/4
|
||||||
|
server recv part 3 (more: 0): part 4/4
|
||||||
|
client recv (more: 1): PART 4/4
|
||||||
|
client recv (more: 0): msg# was 3
|
||||||
|
child exited.
|
Loading…
Reference in New Issue
Block a user