aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/music/music-scripts
diff options
context:
space:
mode:
authorLeonardo Bellini <leonardo.bellini@att.com>2018-03-07 12:07:30 -0600
committerLeonardo Bellini <leonardo.bellini@att.com>2018-03-07 12:07:50 -0600
commitde47fd4a4a19e950ff8f074b95ceb1c981ba3b94 (patch)
tree1d223098f5cd0f60ebff9330a08b4f6808c2085b /test/csit/scripts/music/music-scripts
parent43cee066880eabe9745149c44aa96cd9a99d1e0e (diff)
freeze 1st test group for music integration
Issue-ID: MUSIC-50 Change-Id: I1eb7e879e18cf4f96fbbaaf9e67cb3e8aed6e2fe Signed-off-by: Leonardo Bellini <leonardo.bellini@att.com>
Diffstat (limited to 'test/csit/scripts/music/music-scripts')
-rwxr-xr-xtest/csit/scripts/music/music-scripts/wait_for_port.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/csit/scripts/music/music-scripts/wait_for_port.sh b/test/csit/scripts/music/music-scripts/wait_for_port.sh
new file mode 100755
index 000000000..10f08ded1
--- /dev/null
+++ b/test/csit/scripts/music/music-scripts/wait_for_port.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [[ $# -ne 2 ]]; then
+ echo "Usage: wait-for-port hostname port" >&2
+ exit 1
+fi
+
+host=$1
+port=$2
+
+echo "Waiting for $host port $port open"
+until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do
+ sleep 1
+done
+
+echo "$host port $port is open"
+
+exit 0