diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-03-28 09:05:38 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-03-28 09:30:52 +0200 |
commit | 38179d4377a85a0d77cfe5dfe2e5680c0f531179 (patch) | |
tree | bf2ab14bf19b82a2b228b45bdd62887045e69c08 /tests | |
parent | 825961bb1d9f84eee1ce2eff3e22d20a40a0f617 (diff) | |
download | gnutls-38179d4377a85a0d77cfe5dfe2e5680c0f531179.tar.gz |
tests: added global locks on tls-fuzzer tests
They both require access to the same port and thus cannot
be run in parallel.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/common.sh | 7 | ||||
-rwxr-xr-x | tests/suite/tls-fuzzer/tls-fuzzer-cert.sh | 3 | ||||
-rwxr-xr-x | tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh index 485197a291..8c0e1e920f 100644 --- a/tests/scripts/common.sh +++ b/tests/scripts/common.sh @@ -164,3 +164,10 @@ wait_udp_server() { sleep 4 } +if test -x /usr/bin/lockfile-create;then +LOCKFILE="lockfile-create global" +UNLOCKFILE="lockfile-remove global" +else +LOCKFILE="lockfile global.lock" +UNLOCKFILE="rm -f global.lock" +fi diff --git a/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh b/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh index ac942f3e6c..ad068b5ead 100755 --- a/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh +++ b/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh @@ -31,6 +31,8 @@ TMPFILE=tls-fuzzer-cert.$$.tmp #eval "${GETPORT}" PORT=4433 +$LOCKFILE + pushd tls-fuzzer if ! test -d tlsfuzzer;then @@ -65,4 +67,5 @@ rm -f ${TMPFILE} popd +$UNLOCKFILE exit $retval diff --git a/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh b/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh index ea19ffcd1f..6459fbf4df 100755 --- a/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh +++ b/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh @@ -31,6 +31,8 @@ TMPFILE=tls-fuzzer.$$.tmp #eval "${GETPORT}" PORT=4433 +$LOCKFILE + pushd tls-fuzzer if ! test -d tlsfuzzer;then @@ -65,4 +67,5 @@ rm -f ${TMPFILE} popd +$UNLOCKFILE exit $retval |