Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding unit test for output proxy connecting to output specs of a workflow #3112

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Framework/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,19 @@ o2_add_test(
arguments --consumer
"--global-config consumer-config --local-option hello-aliceo2 --a-boolean3 --an-int2 20 --a-double2 22. --an-int64-2 50000000000000"
)

# Helper script for unit test 'test-ProxyForwarding', need a helper to combine
# two executables on the command line.
# Test runs a combined workflow with the DanglingOutputs tests and the o2-dpl-output-proxy.
# The output proxy connects to the data spec which is not dangling, i.e. it is consumed
# by both processor B and the output proxy.
configure_file(test/test-ProxyForwarding.sh.in ${CMAKE_BINARY_DIR}/stage/tests/o2-test-framework-ProxyForwarding.sh COPYONLY)
add_test(
NAME
test-ProxyForwarding
COMMAND
o2-test-framework-ProxyForwarding.sh
WORKING_DIRECTORY
"${CMAKE_BINARY_DIR}/stage/tests"
)
set_tests_properties(test-ProxyForwarding PROPERTIES TIMEOUT 5)
10 changes: 10 additions & 0 deletions Framework/Core/test/test-ProxyForwarding.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

# Helper script for unit test 'test-ProxyForwarding', need a helper to combine
# two executables on the command line.
# Run a combined workflow with the DanglingOutputs tests and the o2-dpl-output-proxy.
# The output proxy connects to the data spec which is not dangling, i.e. it is consumed
# by both processor B and the output proxy.
./o2-test-framework-DanglingOutputs | \
../bin/o2-dpl-output-proxy --run --dataspec dpl-output-proxy:TST/A1/0 \
--channel-config name=dpl-output-proxy,type=pub,method=bind,address=ipc://localhost${PID}_4200,rateLogging=10,transport=zeromq