mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
improve tests
This commit is contained in:
parent
a9d1584180
commit
c0fc6f4a10
2 changed files with 22 additions and 8 deletions
|
@ -64,6 +64,12 @@ cat > config.json <<EOF
|
|||
{
|
||||
"in": "sig_1",
|
||||
"out": "file_2"
|
||||
},
|
||||
{
|
||||
"in": "sig_1"
|
||||
},
|
||||
{
|
||||
"in": "sig_1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##################################################################################
|
||||
|
||||
echo "Test is broken"
|
||||
exit 99
|
||||
# echo "Test is broken"
|
||||
# exit 99
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -36,17 +36,22 @@ function finish {
|
|||
}
|
||||
trap finish EXIT
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-100}
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
cat > config.json << EOF
|
||||
cat > config1.json << EOF
|
||||
{
|
||||
"http": {
|
||||
"port": 8081
|
||||
},
|
||||
"nodes": {
|
||||
"node1": {
|
||||
"type": "websocket",
|
||||
|
||||
"destinations": [
|
||||
"ws://127.0.0.1:8080/node2.protobuf"
|
||||
]
|
||||
],
|
||||
|
||||
"wait_connected": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,14 +70,17 @@ cat > config2.json << EOF
|
|||
}
|
||||
EOF
|
||||
|
||||
VILLAS_LOG_PREFIX="[signal] " \
|
||||
villas signal -l ${NUM_SAMPLES} -n random > input.dat
|
||||
|
||||
villas pipe -r -l ${NUM_SAMPLES} ${CONFIG_FILE2} node2 | tee output.dat &
|
||||
VILLAS_LOG_PREFIX="[pipe2] " \
|
||||
villas pipe -d debug -l ${NUM_SAMPLES} -r config2.json node2 > output.dat &
|
||||
|
||||
sleep 1
|
||||
|
||||
villas pipe -s config.json node1 < <(sleep 1; cat input.dat)
|
||||
VILLAS_LOG_PREFIX="[pipe1] " \
|
||||
villas pipe -d debug -L ${NUM_SAMPLES} -s config1.json node1 < input.dat
|
||||
|
||||
wait $!
|
||||
wait %%
|
||||
|
||||
villas compare input.dat output.dat
|
||||
|
|
Loading…
Add table
Reference in a new issue