diff options
author | Alon Bar-Lev <alon.barlev@gmail.com> | 2017-01-05 10:35:29 +0200 |
---|---|---|
committer | Alon Bar-Lev <alon.barlev@gmail.com> | 2017-01-20 13:38:08 +0200 |
commit | b9e7ae866f18206aed8a4dffd84c8f7cbcdd9211 (patch) | |
tree | e04a0bf9aee5063c69a03528bcd3eb6739e9cff5 /tests/scripts | |
parent | aefab4a220faee14f33e3d9831c5673a4caf9694 (diff) | |
download | gnutls-b9e7ae866f18206aed8a4dffd84c8f7cbcdd9211.tar.gz |
tests: remove bash usage
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/common.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh index 8e82660155..3cf841c25b 100644 --- a/tests/scripts/common.sh +++ b/tests/scripts/common.sh @@ -19,11 +19,9 @@ # along with this file; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# due to the use of $RANDOM, this script requires bash - export TZ="UTC" -GETPORT='rc=0;while test $rc = 0;do PORT="$(((($$<<15)|RANDOM) % 63001 + 2000))"; +GETPORT='rc=0;myrandom=$(date +%N | sed 's/^0*//');while test $rc = 0;do PORT="$(((($$<<15)|$myrandom) % 63001 + 2000))"; netstat -anl|grep "[\:\.]$PORT" >/dev/null 2>&1; rc=$?;done;' |