]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add simple and dirty script to find ports being used 19102/head
authorJoao Eduardo Luis <joao@suse.de>
Wed, 22 Nov 2017 16:58:34 +0000 (16:58 +0000)
committerJoao Eduardo Luis <joao@suse.de>
Wed, 22 Nov 2017 16:58:34 +0000 (16:58 +0000)
Seriously, having this is way better than realizing that one needs to
find an unused port each time a new test is created.

It's far from a perfect script. It's downright not elegant.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
qa/find-used-ports.sh [new file with mode: 0755]

diff --git a/qa/find-used-ports.sh b/qa/find-used-ports.sh
new file mode 100755 (executable)
index 0000000..c57525c
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+git --no-pager grep -n '127.0.0.1:[0-9]\+' | sed -n 's/.*127.0.0.1:\([0-9]\+\).*/\1/p' | sort -n | uniq -u