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-05 14:01:57 +0200 |
commit | 22da6ba5d5d719b125f28718861ad136fa7207af (patch) | |
tree | 7ba5a54f8e4ce4b91cb61f599a1be6125ee7e060 /tests/scripts | |
parent | 41da7be67e0e0f30ea274a6f2d5af700be064b61 (diff) | |
download | gnutls-22da6ba5d5d719b125f28718861ad136fa7207af.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;' |