aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/esock_ttest/esock-ttest-server-sock
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-04-17 16:53:08 +0200
committerMicael Karlberg <[email protected]>2019-05-29 15:13:48 +0200
commit08f4df99bbaafbba86a216734fa603bd2996f2a3 (patch)
tree6c5152923c920de2d2273fb0476125dcadba71ac /erts/emulator/test/esock_ttest/esock-ttest-server-sock
parent22258359ff6633300ea6f28638eaae66deb0649a (diff)
downloadotp-08f4df99bbaafbba86a216734fa603bd2996f2a3.tar.gz
otp-08f4df99bbaafbba86a216734fa603bd2996f2a3.tar.bz2
otp-08f4df99bbaafbba86a216734fa603bd2996f2a3.zip
[socket|test] Add async to ttest
Make it possible for the tttest server to run with async.
Diffstat (limited to 'erts/emulator/test/esock_ttest/esock-ttest-server-sock')
-rwxr-xr-xerts/emulator/test/esock_ttest/esock-ttest-server-sock24
1 files changed, 21 insertions, 3 deletions
diff --git a/erts/emulator/test/esock_ttest/esock-ttest-server-sock b/erts/emulator/test/esock_ttest/esock-ttest-server-sock
index 4ec0d335d9..4ea8ce0185 100755
--- a/erts/emulator/test/esock_ttest/esock-ttest-server-sock
+++ b/erts/emulator/test/esock_ttest/esock-ttest-server-sock
@@ -24,9 +24,27 @@ EMU=$ERL_TOP/erts/emulator
EMU_TEST=$EMU/test
ESOCK_TTEST=$EMU_TEST/esock_ttest
-if [ $# = 1 ]; then
- ACTIVE="--active $1"
+# $1 - async - boolean()
+# $2 - active - once | boolean()
+if [ $# = 2 ]; then
+
+ async=$1
+ active=$2
+
+ if [ $async = true ]; then
+ ASYNC="--async"
+ else
+ ASYNC=
+ fi
+
+ ACTIVE="--active $async"
+
+else
+ echo "<ERROR> Missing args: async and active"
+ echo ""
+ exit 1
fi
-$ESOCK_TTEST/esock-ttest --server --transport sock $ACTIVE
+
+$ESOCK_TTEST/esock-ttest --server $ASYNC --transport sock $ACTIVE