diff --git a/basice2e/run.sh b/basice2e/run.sh index cb032d5602e4defd94d0adaf2426b7008ba1a40e..3627feef08edfc2972183250cc7bbf70d4347e89 100755 --- a/basice2e/run.sh +++ b/basice2e/run.sh @@ -1107,6 +1107,50 @@ wait $PIDVAL1 wait $PIDVAL2 echo "FILE TRANSFER FINISHED..." + +echo "TESTING BROADCAST CHANNELS..." + +# New broadcast channel... +CLIENTCMD="timeout 240s ../bin/client broadcast --password hello --ndf results/ndf.json --waitTimeout 1800 -l $CLIENTOUT/client120.log -s blob120 --new --name broadcast-test --description \"Integration test channel\" --chanPath results/integration-channel.json --keyPath results/integration-chan-key.pem --receiveCount 0" +eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true & +PIDVAL1=$! +echo "$CLIENTCMD -- $PIDVAL1" +wait $PIDVAL1 + +# Start client to listen for messages on the channel +CLIENTCMD="timeout 480s ../bin/client broadcast --password hello --ndf results/ndf.json --waitTimeout 1800 -l $CLIENTOUT/client121.log -s blob121 --chanPath results/integration-channel.json --receiveCount 4" +eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true & +PIDVAL1=$! +echo "$CLIENTCMD -- $PIDVAL1" + +sleep 10 + +# Send symmetric broadcast to channel +CLIENTCMD="timeout 240s ../bin/client broadcast --password hello --ndf results/ndf.json --waitTimeout 360 -l $CLIENTOUT/client122.log -s blob122 --chanPath results/integration-channel.json --receiveCount 0 --sendDelay 5000 --symmetric \"Hello to symmetric channel from channel client 122!\"" +eval $CLIENTCMD >> $CLIENTOUT/client122.txt || true & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL2" + +# Send asymmetric broadcast to channel +CLIENTCMD="timeout 240s ../bin/client broadcast --password hello --ndf results/ndf.json --waitTimeout 360 -l $CLIENTOUT/client123.log -s blob123 --chanPath results/integration-channel.json --receiveCount 0 --sendDelay 5000 --keyPath results/integration-chan-key.pem --asymmetric \"Hello to asymmetric channel from channel client 123!\"" +eval $CLIENTCMD >> $CLIENTOUT/client123.txt || true & +PIDVAL3=$! +echo "$CLIENTCMD -- $PIDVAL3" + +# Send symmetric & asymmetric broadcasts to channel +CLIENTCMD="timeout 240s ../bin/client broadcast --password hello --ndf results/ndf.json --waitTimeout 360 -l $CLIENTOUT/client124.log -s blob124 --chanPath results/integration-channel.json --receiveCount 0 --sendDelay 5000 --keyPath results/integration-chan-key.pem --asymmetric \"Hello to asymmetric channel from channel client 124!\" --symmetric \"Hello to symmetric channel from channel client 124!\"" +eval $CLIENTCMD >> $CLIENTOUT/client124.txt || true & +PIDVAL4=$! +echo "$CLIENTCMD -- $PIDVAL4" + +wait $PIDVAL2 +wait $PIDVAL3 +wait $PIDVAL4 +wait $PIDVAL1 + +echo "BROADCAST CHANNELS FINISHED..." + + echo "TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."