From ce919ad6ce8e3d383a6d7e8a08ed31c6ac5f31e4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 22 Sep 2021 10:42:03 +0200 Subject: [PATCH] tests: use villas helper script --- tests/integration/api-capabilities.sh | 2 +- tests/integration/api-config.sh | 2 +- tests/integration/api-nodes.sh | 2 +- tests/integration/api-paths.sh | 2 +- tests/integration/api-restart.sh | 2 +- tests/integration/api-shutdown.sh | 5 +++-- tests/integration/api-stress.sh | 2 +- tests/integration/compare.sh | 16 ++++++++-------- tests/integration/convert.sh | 10 +++++----- tests/integration/hook-average.sh | 4 ++-- tests/integration/hook-decimate.sh | 4 ++-- tests/integration/hook-dp.sh | 8 ++++---- tests/integration/hook-drop.sh | 4 ++-- tests/integration/hook-gate.sh | 4 ++-- tests/integration/hook-limit_rate.sh | 6 +++--- tests/integration/hook-lua.sh | 4 ++-- tests/integration/hook-lua_script.sh | 4 ++-- tests/integration/hook-print.sh | 6 +++--- tests/integration/hook-scale.sh | 4 ++-- tests/integration/hook-shift_seq.sh | 4 ++-- tests/integration/hook-shift_ts.sh | 8 ++++---- tests/integration/hook-skip_first.sh | 4 ++-- tests/integration/hook-skip_first2.sh | 4 ++-- tests/integration/missing-example-configs.sh | 4 ++-- tests/integration/node-can.sh | 17 +++++------------ tests/integration/node-hook.sh | 10 +++------- tests/integration/node-infiniband.sh | 17 +++++------------ tests/integration/node-loopback-socket.sh | 17 +++++------------ tests/integration/node-multiple_sources.sh | 13 ++++--------- tests/integration/node-mux_demux.sh | 11 +++-------- tests/integration/node-stats.sh | 9 ++------- tests/integration/node-test_rtt.sh | 9 ++------- tests/integration/pipe-loopback-amqp.sh | 12 ++++-------- tests/integration/pipe-loopback-exec.sh | 11 ++++------- tests/integration/pipe-loopback-file.sh | 8 ++++---- .../integration/pipe-loopback-iec61850-9-2.sh | 12 ++++-------- tests/integration/pipe-loopback-loopback.sh | 8 ++++---- tests/integration/pipe-loopback-mqtt.sh | 12 ++++-------- tests/integration/pipe-loopback-nanomsg.sh | 12 ++++-------- tests/integration/pipe-loopback-rtp-dual.sh | 17 +++++------------ tests/integration/pipe-loopback-rtp-remote.sh | 14 +++++--------- tests/integration/pipe-loopback-rtp-tbf.sh | 19 +++++-------------- tests/integration/pipe-loopback-rtp.sh | 12 ++++-------- tests/integration/pipe-loopback-shmem.sh | 8 ++++---- .../pipe-loopback-socket-multicast.sh | 8 ++++---- .../integration/pipe-loopback-socket-netem.sh | 8 ++++---- tests/integration/pipe-loopback-socket.sh | 12 ++++-------- tests/integration/pipe-loopback-websocket.sh | 17 +++++------------ tests/integration/pipe-loopback-zeromq.sh | 12 ++++-------- tests/integration/pipe-python-protobuf.sh | 11 +++-------- tests/integration/test-config.sh | 2 +- 51 files changed, 163 insertions(+), 270 deletions(-) diff --git a/tests/integration/api-capabilities.sh b/tests/integration/api-capabilities.sh index 705993150..656aa7551 100755 --- a/tests/integration/api-capabilities.sh +++ b/tests/integration/api-capabilities.sh @@ -27,7 +27,7 @@ set -e FETCHED_CONF=$(mktemp) # Start without a configuration -villas-node & +villas node & PID=$! # Wait for node to complete init diff --git a/tests/integration/api-config.sh b/tests/integration/api-config.sh index 54cd54370..dce0ec307 100755 --- a/tests/integration/api-config.sh +++ b/tests/integration/api-config.sh @@ -44,7 +44,7 @@ EOF ID=$(uuidgen) # Start VILLASnode instance with local config -villas-node ${CONFIG_FILE} & +villas node ${CONFIG_FILE} & # Wait for node to complete init sleep 1 diff --git a/tests/integration/api-nodes.sh b/tests/integration/api-nodes.sh index be1cd159f..eb1601fda 100755 --- a/tests/integration/api-nodes.sh +++ b/tests/integration/api-nodes.sh @@ -63,7 +63,7 @@ cat > ${CONFIG_FILE} < ${CONFIG_FILE} < ${LOCAL_CONF} EOF # Start with base configuration -villas-node & +villas node & # Wait for node to complete init sleep 1 diff --git a/tests/integration/api-shutdown.sh b/tests/integration/api-shutdown.sh index d21dadf0a..8574345df 100755 --- a/tests/integration/api-shutdown.sh +++ b/tests/integration/api-shutdown.sh @@ -35,7 +35,8 @@ cat > ${CONFIG_FILE} <0 (fail) in case the 3 second timeout was reached wait $! diff --git a/tests/integration/api-stress.sh b/tests/integration/api-stress.sh index c7481c128..021cf6fb8 100755 --- a/tests/integration/api-stress.sh +++ b/tests/integration/api-stress.sh @@ -28,7 +28,7 @@ SCRIPTPATH=$(dirname ${SCRIPT}) LOCAL_CONF=${SCRIPTPATH}/../../etc/loopback.json # Start VILLASnode instance with local config -villas-node ${LOCAL_CONF} & +villas node ${LOCAL_CONF} & PID=$! # Wait for node to complete init diff --git a/tests/integration/compare.sh b/tests/integration/compare.sh index 29edb890e..cf4df4fa5 100755 --- a/tests/integration/compare.sh +++ b/tests/integration/compare.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration test for villas-compare. +# Integration test for villas compare. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -43,31 +43,31 @@ cat > ${INPUT_FILE} < ${TEMP_FILE} -villas-compare ${INPUT_FILE} ${TEMP_FILE} +villas compare ${INPUT_FILE} ${TEMP_FILE} (( $? == 1 )) || fail 2 ( head -n-1 ${INPUT_FILE}; echo "1491095597.545159701(55) -0.587785" ) > ${TEMP_FILE} -villas-compare ${INPUT_FILE} ${TEMP_FILE} +villas compare ${INPUT_FILE} ${TEMP_FILE} (( $? == 2 )) || fail 3 ( head -n-1 ${INPUT_FILE}; echo "1491095598.545159701(9) -0.587785" ) > ${TEMP_FILE} -villas-compare ${INPUT_FILE} ${TEMP_FILE} +villas compare ${INPUT_FILE} ${TEMP_FILE} (( $? == 3 )) || fail 4 ( head -n-1 ${INPUT_FILE}; echo "1491095597.545159701(9) -0.587785 -0.587785" ) > ${TEMP_FILE} -villas-compare ${INPUT_FILE} ${TEMP_FILE} +villas compare ${INPUT_FILE} ${TEMP_FILE} (( $? == 4 )) || fail 5 ( head -n-1 ${INPUT_FILE}; echo "1491095597.545159701(9) -1.587785" ) > ${TEMP_FILE} -villas-compare ${INPUT_FILE} ${TEMP_FILE} +villas compare ${INPUT_FILE} ${TEMP_FILE} (( $? == 5 )) || fail 6 ( cat ${INPUT_FILE}; echo "1491095597.545159701(9) -0.587785" ) > ${TEMP_FILE} -villas-compare ${INPUT_FILE} ${TEMP_FILE} +villas compare ${INPUT_FILE} ${TEMP_FILE} (( $? == 1 )) || fail 7 rm ${INPUT_FILE} ${TEMP_FILE} diff --git a/tests/integration/convert.sh b/tests/integration/convert.sh index 11d4300bf..16571ab09 100755 --- a/tests/integration/convert.sh +++ b/tests/integration/convert.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration test for villas-convert tool +# Integration test for villas convert tool # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -30,11 +30,11 @@ INPUT_FILE=$(mktemp) FORMATS="villas.human csv tsv json" # Generate test data -villas-signal -v5 -n -l20 mixed > ${INPUT_FILE} +villas signal -v5 -n -l20 mixed > ${INPUT_FILE} for FORMAT in ${FORMATS}; do - villas-convert -o ${FORMAT} < ${INPUT_FILE} | tee ${TEMP} | \ - villas-convert -i ${FORMAT} > ${OUTPUT_FILE} + villas convert -o ${FORMAT} < ${INPUT_FILE} | tee ${TEMP} | \ + villas convert -i ${FORMAT} > ${OUTPUT_FILE} - villas-compare ${INPUT_FILE} ${OUTPUT_FILE} + villas compare ${INPUT_FILE} ${OUTPUT_FILE} done diff --git a/tests/integration/hook-average.sh b/tests/integration/hook-average.sh index 74462cbfa..96e33177c 100755 --- a/tests/integration/hook-average.sh +++ b/tests/integration/hook-average.sh @@ -54,10 +54,10 @@ cat < ${EXPECT_FILE} EOF # Average over first and third signal (mask = 0b101 = 5) -villas-hook -o offset=0 -o signals=signal0,signal1,signal2,signal3,signal4 average < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook -o offset=0 -o signals=signal0,signal1,signal2,signal3,signal4 average < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare -e 1e-6 ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? rm -f ${INPUT_FILE} ${OUTPUT_FILE} ${EXPECT_FILE} diff --git a/tests/integration/hook-decimate.sh b/tests/integration/hook-decimate.sh index 973753903..27ef0a8e6 100755 --- a/tests/integration/hook-decimate.sh +++ b/tests/integration/hook-decimate.sh @@ -46,10 +46,10 @@ cat < ${EXPECT_FILE} 1490500400.676379108(9) -0.587785 -0.587785 -0.587785 -0.587785 EOF -villas-hook -o ratio=3 decimate < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook -o ratio=3 decimate < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? diff --git a/tests/integration/hook-dp.sh b/tests/integration/hook-dp.sh index 46d33566a..00a415585 100755 --- a/tests/integration/hook-dp.sh +++ b/tests/integration/hook-dp.sh @@ -36,16 +36,16 @@ F0=50 OPTS="-o f0=${F0} -o rate=${RATE} -o signal=0 -o harmonics=0,1,3,5,7" -villas-signal sine -v1 -l ${NUM_SAMPLES} -f ${F0} -r ${RATE} -n > ${INPUT_FILE} +villas signal sine -v1 -l ${NUM_SAMPLES} -f ${F0} -r ${RATE} -n > ${INPUT_FILE} -villas-hook dp -o inverse=false ${OPTS} < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook dp -o inverse=false ${OPTS} < ${INPUT_FILE} > ${OUTPUT_FILE} -villas-hook dp -o inverse=true ${OPTS} < ${OUTPUT_FILE} > ${RECON_FILE} +villas hook dp -o inverse=true ${OPTS} < ${OUTPUT_FILE} > ${RECON_FILE} exit 0 # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? rm -f ${INPUT_FILE} ${OUTPUT_FILE} ${EXPECT_FILE} diff --git a/tests/integration/hook-drop.sh b/tests/integration/hook-drop.sh index a35b58d36..eb094ec10 100755 --- a/tests/integration/hook-drop.sh +++ b/tests/integration/hook-drop.sh @@ -52,10 +52,10 @@ cat < ${EXPECT_FILE} 1490500400.676379108(9) -0.587785 -0.587785 -0.587785 -0.587785 EOF -villas-hook drop < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook drop < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? diff --git a/tests/integration/hook-gate.sh b/tests/integration/hook-gate.sh index d5a2e2665..1f028299c 100755 --- a/tests/integration/hook-gate.sh +++ b/tests/integration/hook-gate.sh @@ -49,10 +49,10 @@ cat < ${EXPECT_FILE} 1561591855.077804200(8) 0.015231 -0.149670 1.000000 -0.904358 0.904782 EOF -villas-hook gate -o signal=signal2 -o mode=above < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook gate -o signal=signal2 -o mode=above < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? rm -f ${INPUT_FILE} ${OUTPUT_FILE} ${EXPECT_FILE} diff --git a/tests/integration/hook-limit_rate.sh b/tests/integration/hook-limit_rate.sh index 2ae64a759..526fc12b8 100755 --- a/tests/integration/hook-limit_rate.sh +++ b/tests/integration/hook-limit_rate.sh @@ -26,13 +26,13 @@ INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) EXPECT_FILE=$(mktemp) -villas-signal -r 1000 -l 1000 -n sine > ${INPUT_FILE} +villas signal -r 1000 -l 1000 -n sine > ${INPUT_FILE} awk 'NR % 10 == 2' < ${INPUT_FILE} > ${EXPECT_FILE} -villas-hook -o rate=100 -o mode=origin limit_rate < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook -o rate=100 -o mode=origin limit_rate < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? diff --git a/tests/integration/hook-lua.sh b/tests/integration/hook-lua.sh index 5e2bd973e..142462afc 100755 --- a/tests/integration/hook-lua.sh +++ b/tests/integration/hook-lua.sh @@ -67,14 +67,14 @@ cat < ${EXPECT_FILE} 1551015509.701653200+6.430676e+07(9) 0 0.587785 145.000000 9 1551015509.701653 EOF -villas-hook lua -c ${CONFIG_FILE} < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook lua -c ${CONFIG_FILE} < ${INPUT_FILE} > ${OUTPUT_FILE} cat ${INPUT_FILE} echo cat ${OUTPUT_FILE} # Compare only the data values -villas-compare -e 1e-6 ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? rm -f ${INPUT_FILE} ${OUTPUT_FILE} ${EXPECT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/hook-lua_script.sh b/tests/integration/hook-lua_script.sh index c2951143e..49cbaedad 100755 --- a/tests/integration/hook-lua_script.sh +++ b/tests/integration/hook-lua_script.sh @@ -101,10 +101,10 @@ cat < ${EXPECT_FILE} 1551015509.701653200+6.430638e+07(9) 555.000000 10.000000 1.600000 0.600000 0.900000 9.000000 EOF -villas-hook lua -c ${CONFIG_FILE} < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook lua -c ${CONFIG_FILE} < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? rm -f ${INPUT_FILE} ${OUTPUT_FILE} ${EXPECT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/hook-print.sh b/tests/integration/hook-print.sh index 9e87bf300..a461ddf37 100755 --- a/tests/integration/hook-print.sh +++ b/tests/integration/hook-print.sh @@ -29,12 +29,12 @@ INPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-100} # Prepare some test data -villas-signal -v 1 -r 10 -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -v 1 -r 10 -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} -villas-hook -o format=villas.human -o output=${OUTPUT_FILE1} print > ${OUTPUT_FILE2} < ${INPUT_FILE} +villas hook -o format=villas.human -o output=${OUTPUT_FILE1} print > ${OUTPUT_FILE2} < ${INPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE1} ${OUTPUT_FILE2} ${INPUT_FILE} +villas compare ${OUTPUT_FILE1} ${OUTPUT_FILE2} ${INPUT_FILE} RC=$? rm -f ${OUTPUT_FILE1} ${OUTPUT_FILE2} ${INPUT_FILE} diff --git a/tests/integration/hook-scale.sh b/tests/integration/hook-scale.sh index febfdcff3..5f1750309 100755 --- a/tests/integration/hook-scale.sh +++ b/tests/integration/hook-scale.sh @@ -54,10 +54,10 @@ cat < ${EXPECT_FILE} 1551015509.701653200(9) 0.060849 -0.587785 1.000000 0.600000 145.000000 EOF -villas-hook scale -o scale=100 -o offset=55 -o signal=signal4 < ${INPUT_FILE} > ${OUTPUT_FILE} +villas hook scale -o scale=100 -o offset=55 -o signal=signal4 < ${INPUT_FILE} > ${OUTPUT_FILE} # Compare only the data values -villas-compare ${OUTPUT_FILE} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE} ${EXPECT_FILE} RC=$? rm -f ${INPUT_FILE} ${OUTPUT_FILE} ${EXPECT_FILE} diff --git a/tests/integration/hook-shift_seq.sh b/tests/integration/hook-shift_seq.sh index fd41fff4c..3da053668 100755 --- a/tests/integration/hook-shift_seq.sh +++ b/tests/integration/hook-shift_seq.sh @@ -26,8 +26,8 @@ OUTPUT_FILE=$(mktemp) OFFSET=100 -villas-signal -l ${NUM_SAMPLES} -n random | \ -villas-hook -o offset=${OFFSET} shift_seq > ${OUTPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random | \ +villas hook -o offset=${OFFSET} shift_seq > ${OUTPUT_FILE} # Compare shifted sequence no diff -u \ diff --git a/tests/integration/hook-shift_ts.sh b/tests/integration/hook-shift_ts.sh index e945e2559..602003655 100755 --- a/tests/integration/hook-shift_ts.sh +++ b/tests/integration/hook-shift_ts.sh @@ -29,10 +29,10 @@ NUM_SAMPLES=${NUM_SAMPLES:-10} OFFSET=-10.0 EPSILON=0.5 -villas-signal -l ${NUM_SAMPLES} -r 50 random | \ -villas-hook -o offset=${OFFSET} shift_ts | \ -villas-hook fix | \ -villas-hook -o format=json -o output="${STATS_FILE}" stats > /dev/null +villas signal -l ${NUM_SAMPLES} -r 50 random | \ +villas hook -o offset=${OFFSET} shift_ts | \ +villas hook fix | \ +villas hook -o format=json -o output="${STATS_FILE}" stats > /dev/null jq .owd ${STATS_FILE} jq -e ".owd.mean + ${OFFSET} | length < ${EPSILON}" ${STATS_FILE} > /dev/null diff --git a/tests/integration/hook-skip_first.sh b/tests/integration/hook-skip_first.sh index d185b30bf..d2cfb77f4 100755 --- a/tests/integration/hook-skip_first.sh +++ b/tests/integration/hook-skip_first.sh @@ -28,8 +28,8 @@ SKIP=10 echo ${OUTPUT_FILE} -villas-signal -r 1 -l ${NUM_SAMPLES} -n random | \ -villas-hook -o seconds=${SKIP} skip_first > ${OUTPUT_FILE} +villas signal -r 1 -l ${NUM_SAMPLES} -n random | \ +villas hook -o seconds=${SKIP} skip_first > ${OUTPUT_FILE} LINES=$(sed -re '/^#/d' ${OUTPUT_FILE} | wc -l) diff --git a/tests/integration/hook-skip_first2.sh b/tests/integration/hook-skip_first2.sh index 92ae88441..7c0a51982 100755 --- a/tests/integration/hook-skip_first2.sh +++ b/tests/integration/hook-skip_first2.sh @@ -26,8 +26,8 @@ OUTPUT_FILE=$(mktemp) SKIP=50 -villas-signal -r 1 -l ${NUM_SAMPLES} -n random | \ -villas-hook -o samples=${SKIP} skip_first > ${OUTPUT_FILE} +villas signal -r 1 -l ${NUM_SAMPLES} -n random | \ +villas hook -o samples=${SKIP} skip_first > ${OUTPUT_FILE} LINES=$(sed -re '/^#/d' ${OUTPUT_FILE} | wc -l) diff --git a/tests/integration/missing-example-configs.sh b/tests/integration/missing-example-configs.sh index 14a87772e..a3140038d 100755 --- a/tests/integration/missing-example-configs.sh +++ b/tests/integration/missing-example-configs.sh @@ -23,8 +23,8 @@ # along with this program. If not, see . ################################################################################## -NODE_TYPES=$(villas-node -C | jq -r '.nodes | join(" ")') -HOOKS_TYPES=$(villas-node -C | jq -r '.["hooks"] | join(" ")') +NODE_TYPES=$(villas node -C | jq -r '.nodes | join(" ")') +HOOKS_TYPES=$(villas node -C | jq -r '.["hooks"] | join(" ")') CONFIGS=$(find -name '*.conf' -o -name '*.json') diff --git a/tests/integration/node-can.sh b/tests/integration/node-can.sh index c4c06a985..e08d68190 100755 --- a/tests/integration/node-can.sh +++ b/tests/integration/node-can.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration can test using villas-node. +# Integration can test using villas node. # # @author Niklas Eiling # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -26,10 +26,6 @@ # sudo ip link add dev vcan0 type vcan # sudo ip link set vcan0 up -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -117,12 +113,10 @@ nodes = { EOF # Generate test data -VILLAS_LOG_PREFIX=$(colorize "[Signal]") \ -villas-signal -v ${NUM_VALUES} -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -v ${NUM_VALUES} -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} # Start node -VILLAS_LOG_PREFIX=$(colorize "[Node] ") \ -villas-node ${CONFIG_FILE} & +villas node ${CONFIG_FILE} & # Wait for node to complete init sleep 1 @@ -131,8 +125,7 @@ candump -n ${NUM_SAMPLES} -T 1000 -L ${CAN_IF} | awk '{print $3}' > ${CAN_OUT_FI CANDUMP_PID=$! # Send / Receive data to node -VILLAS_LOG_PREFIX=$(colorize "[Pipe] ") \ -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} can_node1 > ${OUTPUT_FILE} < ${INPUT_FILE} & +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} can_node1 > ${OUTPUT_FILE} < ${INPUT_FILE} & wait ${CANDUMP_PID} cat ${CAN_OUT_FILE} | xargs -I % cansend ${CAN_IF} % @@ -144,7 +137,7 @@ sleep 1 kill %1 # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? #rm ${CAN_OUT_FILE} ${INPUT_FILE} ${OUTPUT_FILE} diff --git a/tests/integration/node-hook.sh b/tests/integration/node-hook.sh index edef8ba94..4df16e247 100755 --- a/tests/integration/node-hook.sh +++ b/tests/integration/node-hook.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Test hooks in villas-node +# Test hooks in villas node # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) EXPECT_FILE=$(mktemp) @@ -85,10 +81,10 @@ cat > ${CONFIG_FILE} < # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -41,10 +41,6 @@ if [[ ! $(lspci | grep Infiniband) ]]; then fi -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp /tmp/ib-configuration-XXXX.conf) CONFIG_FILE_TARGET=$(mktemp /tmp/ib-configuration-target-XXXX.conf) INPUT_FILE=$(mktemp) @@ -54,8 +50,7 @@ NUM_SAMPLES=${NUM_SAMPLES:-10} RC=0 # Generate test data for RC, UC, and UD test -VILLAS_LOG_PREFIX=$(colorize "[Signal]") \ -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} # Set config file with a MODE flag cat > ${CONFIG_FILE} <${OUTPUT_FILE} <${DATAFIFO} & + ip netns exec namespace0 villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} ib_node_source >${OUTPUT_FILE} <${DATAFIFO} & node_pipe=$! # Keep pipe alive @@ -184,7 +177,7 @@ do kill $node_proc # Compare data - villas-compare ${INPUT_FILE} ${OUTPUT_FILE} + villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? # Exit, if an error occurs diff --git a/tests/integration/node-loopback-socket.sh b/tests/integration/node-loopback-socket.sh index c0b72a272..2b23c82a0 100755 --- a/tests/integration/node-loopback-socket.sh +++ b/tests/integration/node-loopback-socket.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test using villas-node. +# Integration loopback test using villas node. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -76,19 +72,16 @@ cat > ${CONFIG_FILE} < ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} # Start node -VILLAS_LOG_PREFIX=$(colorize "[Node] ") \ -villas-node ${CONFIG_FILE} & +villas node ${CONFIG_FILE} & # Wait for node to complete init sleep 1 # Send / Receive data to node -VILLAS_LOG_PREFIX=$(colorize "[Pipe] ") \ -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node2 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node2 > ${OUTPUT_FILE} < ${INPUT_FILE} # Wait for node to handle samples sleep 1 @@ -97,7 +90,7 @@ sleep 1 kill %1 # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${CONFIG_FILE} ${INPUT_FILE} ${OUTPUT_FILE} diff --git a/tests/integration/node-multiple_sources.sh b/tests/integration/node-multiple_sources.sh index c2c7a4934..bb7f93ef5 100755 --- a/tests/integration/node-multiple_sources.sh +++ b/tests/integration/node-multiple_sources.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test using villas-node. +# Integration loopback test using villas node. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -25,10 +25,6 @@ # Test is broken exit 99 -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) OUTPUT_FILE1=$(mktemp) OUTPUT_FILE2=$(mktemp) @@ -73,8 +69,7 @@ EOF villas signal counter -o 100 -v 1 -l 10 -n > ${EXPECT_FILE} # Start node -VILLAS_LOG_PREFIX=$(colorize "[Node] ") \ -villas-node ${CONFIG_FILE} & +villas node ${CONFIG_FILE} & P1=$! sleep 2 @@ -83,8 +78,8 @@ kill ${P1} wait ${P1} # Compare only the data values -villas-compare ${OUTPUT_FILE1} ${EXPECT_FILE} && \ -villas-compare ${OUTPUT_FILE2} ${EXPECT_FILE} +villas compare ${OUTPUT_FILE1} ${EXPECT_FILE} && \ +villas compare ${OUTPUT_FILE2} ${EXPECT_FILE} RC=$? rm ${CONFIG_FILE} ${EXPECT_FILE} \ diff --git a/tests/integration/node-mux_demux.sh b/tests/integration/node-mux_demux.sh index 1e0a23445..acf52ea99 100755 --- a/tests/integration/node-mux_demux.sh +++ b/tests/integration/node-mux_demux.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test using villas-node. +# Integration loopback test using villas node. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) EXPECT_FILE=$(mktemp) @@ -92,11 +88,10 @@ cat > ${CONFIG_FILE} < # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) STATS_LOG=$(mktemp) @@ -76,8 +72,7 @@ cat > ${CONFIG_FILE} < # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -26,10 +26,6 @@ echo "Test not yet supported" exit 99 -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) cat > ${CONFIG_FILE} < ${CONFIG_FILE} < # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -33,7 +29,7 @@ OUTPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-100} # Generate test data -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} FORMAT="protobuf" VECTORIZE="10" @@ -65,10 +61,10 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-exec.sh b/tests/integration/pipe-loopback-exec.sh index cf03c9f4f..00ef32a71 100755 --- a/tests/integration/pipe-loopback-exec.sh +++ b/tests/integration/pipe-loopback-exec.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,9 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) @@ -33,7 +30,7 @@ OUTPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-100} # Generate test data -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} FORMAT="villas.human" @@ -50,10 +47,10 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-file.sh b/tests/integration/pipe-loopback-file.sh index becea13de..bc7687d25 100755 --- a/tests/integration/pipe-loopback-file.sh +++ b/tests/integration/pipe-loopback-file.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -50,12 +50,12 @@ cat > ${CONFIG_FILE} << EOF EOF # Generate test data -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} ${NODE_FILE} diff --git a/tests/integration/pipe-loopback-iec61850-9-2.sh b/tests/integration/pipe-loopback-iec61850-9-2.sh index 648a7c360..d36d8a215 100755 --- a/tests/integration/pipe-loopback-iec61850-9-2.sh +++ b/tests/integration/pipe-loopback-iec61850-9-2.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -33,7 +29,7 @@ OUTPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-100} # Generate test data -villas-signal -l ${NUM_SAMPLES} -v 4 -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -v 4 -n random > ${INPUT_FILE} cat > ${CONFIG_FILE} << EOF { @@ -65,10 +61,10 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare -T ${INPUT_FILE} ${OUTPUT_FILE} +villas compare -T ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-loopback.sh b/tests/integration/pipe-loopback-loopback.sh index a76b5ab36..0a7f7c547 100755 --- a/tests/integration/pipe-loopback-loopback.sh +++ b/tests/integration/pipe-loopback-loopback.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -39,12 +39,12 @@ cat > ${CONFIG_FILE} << EOF EOF # Generate test data -villas-signal -v 5 -l ${NUM_SAMPLES} -n mixed > ${INPUT_FILE} +villas signal -v 5 -l ${NUM_SAMPLES} -n mixed > ${INPUT_FILE} -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-mqtt.sh b/tests/integration/pipe-loopback-mqtt.sh index e465a89e1..c29978a4b 100755 --- a/tests/integration/pipe-loopback-mqtt.sh +++ b/tests/integration/pipe-loopback-mqtt.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -33,7 +29,7 @@ OUTPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-100} # Generate test data -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} FORMAT="protobuf" VECTORIZE="10" @@ -62,10 +58,10 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-nanomsg.sh b/tests/integration/pipe-loopback-nanomsg.sh index 5403b71ca..e2b80943e 100755 --- a/tests/integration/pipe-loopback-nanomsg.sh +++ b/tests/integration/pipe-loopback-nanomsg.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -33,7 +29,7 @@ OUTPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-100} # Generate test data -villas-signal -v 5 -l ${NUM_SAMPLES} -n mixed > ${INPUT_FILE} +villas signal -v 5 -l ${NUM_SAMPLES} -n mixed > ${INPUT_FILE} FORMAT="protobuf" VECTORIZE="10" @@ -63,10 +59,10 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-rtp-dual.sh b/tests/integration/pipe-loopback-rtp-dual.sh index 855b47c44..fae42d029 100755 --- a/tests/integration/pipe-loopback-rtp-dual.sh +++ b/tests/integration/pipe-loopback-rtp-dual.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @author Marvin Klimke @@ -29,10 +29,6 @@ if [ -n "${CI}" ]; then exit 99 fi -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE_SRC=$(mktemp) CONFIG_FILE_DEST=$(mktemp) INPUT_FILE=$(mktemp) @@ -114,19 +110,16 @@ cat > ${CONFIG_FILE_DEST} << EOF } EOF -VILLAS_LOG_PREFIX="[DEST] " \ -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE_DEST} rtp_node > ${OUTPUT_FILE} & +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE_DEST} rtp_node > ${OUTPUT_FILE} & PID=$! sleep 1 -VILLAS_LOG_PREFIX="[SIGN] " \ -villas-signal mixed -v 5 -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ -VILLAS_LOG_PREFIX="[SRC] " \ -villas-pipe ${CONFIG_FILE_SRC} rtp_node > ${OUTPUT_FILE} +villas signal mixed -v 5 -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ +villas pipe ${CONFIG_FILE_SRC} rtp_node > ${OUTPUT_FILE} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE_SRC} ${CONFIG_FILE_DEST} diff --git a/tests/integration/pipe-loopback-rtp-remote.sh b/tests/integration/pipe-loopback-rtp-remote.sh index 886e00925..58c6c3416 100755 --- a/tests/integration/pipe-loopback-rtp-remote.sh +++ b/tests/integration/pipe-loopback-rtp-remote.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @author Marvin Klimke @@ -37,10 +37,6 @@ REMOTE="ssh ${REMOTE_USER}@${REMOTE_ADDR}" PATH=/projects/villas/node/build/src:${PATH} ${REMOTE} PATH=/projects/villas/node/build/src:${PATH} -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/integration-tests-helper.sh - CONFIG_FILE_SRC=$(mktemp) CONFIG_FILE_DEST=$(mktemp) INPUT_FILE=$(mktemp) @@ -126,18 +122,18 @@ EOF scp ${CONFIG_FILE_DEST} ${REMOTE_USER}@${REMOTE_ADDR}:${CONFIG_FILE_DEST} -${REMOTE} villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE_DEST} rtp_node > ${OUTPUT_FILE} & +${REMOTE} villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE_DEST} rtp_node > ${OUTPUT_FILE} & PID=$! sleep 1 -villas-signal mixed -v 5 -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ - villas-pipe ${CONFIG_FILE_SRC} rtp_node +villas signal mixed -v 5 -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ +villas pipe ${CONFIG_FILE_SRC} rtp_node scp ${REMOTE_USER}@${REMOTE_ADDR}:${OUTPUT_FILE} ${OUTPUT_FILE} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${INPUT_FILE} ${OUTPUT_FILE} ${CONFIG_FILE_DEST} ${CONFIG_FILE_SRC} diff --git a/tests/integration/pipe-loopback-rtp-tbf.sh b/tests/integration/pipe-loopback-rtp-tbf.sh index ecf3b9a54..7b95ba929 100755 --- a/tests/integration/pipe-loopback-rtp-tbf.sh +++ b/tests/integration/pipe-loopback-rtp-tbf.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @author Marvin Klimke @@ -29,10 +29,6 @@ if [ -n "${CI}" ]; then exit 99 fi -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE_SRC=$(mktemp) CONFIG_FILE_DEST=$(mktemp) INPUT_FILE=$(mktemp) @@ -118,21 +114,16 @@ tc qdisc add dev lo root handle 4000 prio bands 4 priomap 1 2 2 2 1 2 0 0 1 1 1 tc qdisc add dev lo parent 4000:3 tbf rate 40kbps burst 32kbit latency 200ms #peakrate 40kbps mtu 1000 minburst 1520 tc filter add dev lo protocol ip handle 123 fw flowid 4000:3 -#exit - -VILLAS_LOG_PREFIX="[DEST] " \ -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE_DEST} rtp_node > ${OUTPUT_FILE} & +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE_DEST} rtp_node > ${OUTPUT_FILE} & PID=$! sleep 1 -VILLAS_LOG_PREFIX="[SIGN] " \ -villas-signal mixed -v ${NUM_VALUES} -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ -VILLAS_LOG_PREFIX="[SRC] " \ -villas-pipe ${CONFIG_FILE_SRC} rtp_node > ${OUTPUT_FILE} +villas signal mixed -v ${NUM_VALUES} -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ +villas pipe ${CONFIG_FILE_SRC} rtp_node > ${OUTPUT_FILE} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE_SRC} ${CONFIG_FILE_DEST} diff --git a/tests/integration/pipe-loopback-rtp.sh b/tests/integration/pipe-loopback-rtp.sh index 5faa3fa03..48c62e276 100755 --- a/tests/integration/pipe-loopback-rtp.sh +++ b/tests/integration/pipe-loopback-rtp.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -28,10 +28,6 @@ if [ -n "${CI}" ]; then exit 99 fi -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -81,11 +77,11 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-signal mixed -v 5 -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} +villas signal mixed -v 5 -r ${RATE} -l ${NUM_SAMPLES} | tee ${INPUT_FILE} | \ +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-shmem.sh b/tests/integration/pipe-loopback-shmem.sh index 3dfd8370d..148874625 100755 --- a/tests/integration/pipe-loopback-shmem.sh +++ b/tests/integration/pipe-loopback-shmem.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -52,12 +52,12 @@ cat > ${CONFIG_FILE} << EOF EOF # Generate test data -villas-signal -l ${NUM_SAMPLES} -v ${SIGNAL_COUNT} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -v ${SIGNAL_COUNT} -n random > ${INPUT_FILE} -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? if (( ${RC} != 0 )); then diff --git a/tests/integration/pipe-loopback-socket-multicast.sh b/tests/integration/pipe-loopback-socket-multicast.sh index b679a5a9d..50588d36e 100755 --- a/tests/integration/pipe-loopback-socket-multicast.sh +++ b/tests/integration/pipe-loopback-socket-multicast.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -54,12 +54,12 @@ cat > ${CONFIG_FILE} << EOF EOF # Generate test data -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-socket-netem.sh b/tests/integration/pipe-loopback-socket-netem.sh index 2e814ee2f..917b8d5bc 100755 --- a/tests/integration/pipe-loopback-socket-netem.sh +++ b/tests/integration/pipe-loopback-socket-netem.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -61,11 +61,11 @@ cat > ${CONFIG_FILE} << EOF EOF # Generate test data -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Check network emulation characteristics -villas-hook -o verbose stats < ${OUTPUT_FILE} > /dev/null +villas hook -o verbose stats < ${OUTPUT_FILE} > /dev/null rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-loopback-socket.sh b/tests/integration/pipe-loopback-socket.sh index 7119c9617..a2a1a4722 100755 --- a/tests/integration/pipe-loopback-socket.sh +++ b/tests/integration/pipe-loopback-socket.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -35,7 +31,7 @@ NUM_SAMPLES=${NUM_SAMPLES:-100} NUM_VALUES=${NUM_VALUES:-4} # Generate test data -villas-signal -v ${NUM_VALUES} -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -v ${NUM_VALUES} -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} for FORMAT in villas.human gtnet.fake protobuf; do for LAYER in udp ip eth unix; do @@ -97,7 +93,7 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 < ${INPUT_FILE} > ${OUTPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 < ${INPUT_FILE} > ${OUTPUT_FILE} # Ignore timestamp and seqeunce no if in raw format if ! villas_format_supports_header $FORMAT; then @@ -105,7 +101,7 @@ if ! villas_format_supports_header $FORMAT; then fi # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? if (( ${RC} != 0 )); then diff --git a/tests/integration/pipe-loopback-websocket.sh b/tests/integration/pipe-loopback-websocket.sh index 133678bff..ced902ce8 100755 --- a/tests/integration/pipe-loopback-websocket.sh +++ b/tests/integration/pipe-loopback-websocket.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -25,10 +25,6 @@ # Test is broken exit 99 -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) CONFIG_FILE2=$(mktemp) INPUT_FILE=$(mktemp) @@ -64,21 +60,18 @@ cat > ${CONFIG_FILE2} << EOF EOF # Generate test data -VILLAS_LOG_PREFIX=$(colorize "[Signal]") \ -villas-signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n random > ${INPUT_FILE} -VILLAS_LOG_PREFIX=$(colorize "[Recv] ") \ -villas-pipe -r -l ${NUM_SAMPLES} ${CONFIG_FILE2} node2 | tee ${OUTPUT_FILE} & +villas pipe -r -l ${NUM_SAMPLES} ${CONFIG_FILE2} node2 | tee ${OUTPUT_FILE} & sleep 1 -VILLAS_LOG_PREFIX=$(colorize "[Send] ") \ -villas-pipe -s ${CONFIG_FILE} node1 < <(sleep 1; cat ${INPUT_FILE}) +villas pipe -s ${CONFIG_FILE} node1 < <(sleep 1; cat ${INPUT_FILE}) wait $! # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} ${CONFIG_FILE2} diff --git a/tests/integration/pipe-loopback-zeromq.sh b/tests/integration/pipe-loopback-zeromq.sh index 88c400c24..1ba4dc1b9 100755 --- a/tests/integration/pipe-loopback-zeromq.sh +++ b/tests/integration/pipe-loopback-zeromq.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Integration loopback test for villas-pipe. +# Integration loopback test for villas pipe. # # @author Steffen Vogel # @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC @@ -22,10 +22,6 @@ # along with this program. If not, see . ################################################################################## -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -source ${SCRIPTPATH}/../../tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -33,7 +29,7 @@ OUTPUT_FILE=$(mktemp) NUM_SAMPLES=${NUM_SAMPLES:-10} # Generate test data -villas-signal -l ${NUM_SAMPLES} -n -v 5 random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -n -v 5 random > ${INPUT_FILE} VECTORIZE="10" FORMAT="protobuf" @@ -62,10 +58,10 @@ cat > ${CONFIG_FILE} << EOF } EOF -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < ${INPUT_FILE} # Compare data -villas-compare ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${OUTPUT_FILE} ${INPUT_FILE} ${CONFIG_FILE} diff --git a/tests/integration/pipe-python-protobuf.sh b/tests/integration/pipe-python-protobuf.sh index 49e099bba..0f09167be 100755 --- a/tests/integration/pipe-python-protobuf.sh +++ b/tests/integration/pipe-python-protobuf.sh @@ -25,11 +25,6 @@ # Test is broken exit 99 -SCRIPT=$(realpath $0) -SCRIPTPATH=$(dirname ${SCRIPT}) -SRCDIR=$(realpath ${SCRIPTPATH}/../..) -source ${SRCDIR}/tools/villas-helper.sh - CONFIG_FILE=$(mktemp) INPUT_FILE=$(mktemp) OUTPUT_FILE=$(mktemp) @@ -41,7 +36,7 @@ NUM_SAMPLES=${NUM_SAMPLES:-20} NUM_VALUES=${NUM_VALUES:-5} # Generate test data -villas-signal -l ${NUM_SAMPLES} -v ${NUM_VALUES} -n random > ${INPUT_FILE} +villas signal -l ${NUM_SAMPLES} -v ${NUM_VALUES} -n random > ${INPUT_FILE} case ${LAYER} in unix) @@ -89,13 +84,13 @@ fi sleep 1 -villas-pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} py-client > ${OUTPUT_FILE} < ${INPUT_FILE} +villas pipe -l ${NUM_SAMPLES} ${CONFIG_FILE} py-client > ${OUTPUT_FILE} < ${INPUT_FILE} kill ${CPID} wait ${CPID} # Compare data -villas-compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} +villas compare ${CMPFLAGS} ${INPUT_FILE} ${OUTPUT_FILE} RC=$? rm ${CONFIG_FILE} ${INPUT_FILE} ${OUTPUT_FILE} diff --git a/tests/integration/test-config.sh b/tests/integration/test-config.sh index a0cedad3e..417a1a69e 100755 --- a/tests/integration/test-config.sh +++ b/tests/integration/test-config.sh @@ -40,5 +40,5 @@ for CONFIG in ${CONFIGS}; do fi echo "=== Testing config: ${CONFIG}" - villas-test-config -c ${CONFIG} + villas test-config -c ${CONFIG} done