mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-29 13:01:14 +03:00
Also: - merge CI check and shellcheck jobs into a single one. To share the same shellcheck version and less overhead. - use `set -eu` in more scripts. - make sure CI scripts run from any cwd. To make it easy to run them on local machine. - minor tidy-ups. Closes #1618
36 lines
760 B
Bash
Executable File
36 lines
760 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (C) Viktor Szakats
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
set -eu
|
|
|
|
# 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}" ${LIBSSH2_TEST_EXE_RUNNER:-} "${testbin}"; then
|
|
res='ok'
|
|
else
|
|
res='not ok'
|
|
fi
|
|
else
|
|
if FIXTURE_TEST_CRYPT="${test}" ${LIBSSH2_TEST_EXE_RUNNER:-} "${testbin}"; then
|
|
res='ok'
|
|
else
|
|
res='not ok'
|
|
fi
|
|
fi
|
|
echo "${res} ${count} - test_read-${test}"
|
|
((count++))
|
|
done <<< "${algos}"
|