1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-18 15:20:56 +03:00
Files
libssh2/tests/test_read_algos.test
Viktor Szakats 62178a367a tests: add cmake/autotools options to disable running tests
autotools:
- `--disable-docker-tests`
- `--disable-sshd-tests`

cmake:
- `RUN_DOCKER_TESTS`
- `RUN_SSHD_TESTS`

Update automake and ci to use this new flag and delete former logic
of relying on Windows detection and `HOST_WINDOWS`. Also fix honoring
this when running `test_read_algos.test`.

This allows to disable these individually and on per-CI/local-job basis.
To run as much tests as the env allows.

Cherry-picked from #1017
2023-05-03 15:01:53 +00:00

35 lines
637 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -u
# https://testanything.org/tap-specification.html
testbin="./test_read${EXEEXT:-}"
d="$(dirname "$0")"
algos="$(tr -d $"\r" < "${d}/test_read_algos.txt")"
count=1
total="$(echo "${algos}" | wc -l | tr -d ' ')"
echo "${count}..${total}"
while read -r test; do
if [[ "${test}" = *'mac-'* ]]; then
if FIXTURE_TEST_MAC="${test}" "${testbin}"; then
res='ok'
else
res='not ok'
fi
else
if FIXTURE_TEST_CRYPT="${test}" "${testbin}"; then
res='ok'
else
res='not ok'
fi
fi
echo "${res} ${count} - test_read-${test}"
((count++))
done <<< "${algos}"