tests: make sure that all tests are run

Some tests were not run, because entrypoint.sh used a fixed list of package,
which is easily forgotten to update.  This change creates the list of
packages dynamically.

Signed-off-by: Sven Anderson <sven@redhat.com>
This commit is contained in:
Sven Anderson 2021-04-28 23:55:32 +02:00 committed by mergify[bot]
parent fff2dba3fd
commit 93a4fe6d61
1 changed files with 4 additions and 13 deletions

View File

@ -188,7 +188,7 @@ test_pkg() {
testargs+=(\ testargs+=(\
"-covermode=count" \ "-covermode=count" \
"-coverprofile=${pkg}.cover.out" \ "-coverprofile=${pkg}.cover.out" \
"-coverpkg=${P}/${pkg}") "-coverpkg=${PKG_PREFIX}/${pkg}")
fi fi
if [[ ${CPUPROFILE} = yes ]]; then if [[ ${CPUPROFILE} = yes ]]; then
testargs+=("-cpuprofile" "${pkg}.cpu.out") testargs+=("-cpuprofile" "${pkg}.cpu.out")
@ -241,17 +241,8 @@ test_go_ceph() {
return 0 return 0
fi fi
P=github.com/ceph/go-ceph PKG_PREFIX=github.com/ceph/go-ceph
pkgs=(\ pkgs=$(go list ./... | sed -e "s,^${PKG_PREFIX}/\?,," | grep -v ^contrib)
"cephfs" \
"cephfs/admin" \
"internal/callbacks" \
"internal/cutil" \
"internal/errutil" \
"internal/retry" \
"rados" \
"rbd" \
)
pre_all_tests pre_all_tests
if [[ ${WAIT_FILES} ]]; then if [[ ${WAIT_FILES} ]]; then
wait_for_files ${WAIT_FILES//:/ } wait_for_files ${WAIT_FILES//:/ }
@ -260,7 +251,7 @@ test_go_ceph() {
setup_mirroring setup_mirroring
export MIRROR_CONF export MIRROR_CONF
fi fi
for pkg in "${pkgs[@]}"; do for pkg in ${pkgs}; do
test_pkg "${pkg}" || test_failed "${pkg}" test_pkg "${pkg}" || test_failed "${pkg}"
done done
post_all_tests post_all_tests