Skip to content

Commit 6fed2fe

Browse files
committed
include cygwin and msys2 ostypes to oscp-stapling tests
1 parent 57646a8 commit 6fed2fe

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/ocsp-stapling.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,11 @@ generate_port() {
448448
# Generate a random port number
449449
#-------------------------------------------------------------------------#
450450

451-
if [[ "$OSTYPE" == "linux"* ]]; then
451+
if [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "msys"
452+
|| "$OSTYPE" == "cygwin"* ]]; then
452453
port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512))
453454
elif [[ "$OSTYPE" == "darwin"* ]]; then
454455
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
455-
elif [[ "$OSTYPE" == "msys" ]]; then
456-
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
457456
else
458457
echo "Unknown OS TYPE"
459458
exit 1

scripts/ocsp-stapling2.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ generate_port() {
467467
# Generate a random port number
468468
#-------------------------------------------------------------------------#
469469

470-
if [[ "$OSTYPE" == "linux"* ]]; then
470+
if [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "msys"
471+
|| "$OSTYPE" == "cygwin" ]]; then
471472
port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512))
472473
elif [[ "$OSTYPE" == "darwin"* ]]; then
473474
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))

0 commit comments

Comments
 (0)