mirror of
https://github.com/ceph/go-ceph
synced 2025-01-31 02:21:52 +00:00
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:
parent
fff2dba3fd
commit
93a4fe6d61
@ -188,7 +188,7 @@ test_pkg() {
|
||||
testargs+=(\
|
||||
"-covermode=count" \
|
||||
"-coverprofile=${pkg}.cover.out" \
|
||||
"-coverpkg=${P}/${pkg}")
|
||||
"-coverpkg=${PKG_PREFIX}/${pkg}")
|
||||
fi
|
||||
if [[ ${CPUPROFILE} = yes ]]; then
|
||||
testargs+=("-cpuprofile" "${pkg}.cpu.out")
|
||||
@ -241,17 +241,8 @@ test_go_ceph() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
P=github.com/ceph/go-ceph
|
||||
pkgs=(\
|
||||
"cephfs" \
|
||||
"cephfs/admin" \
|
||||
"internal/callbacks" \
|
||||
"internal/cutil" \
|
||||
"internal/errutil" \
|
||||
"internal/retry" \
|
||||
"rados" \
|
||||
"rbd" \
|
||||
)
|
||||
PKG_PREFIX=github.com/ceph/go-ceph
|
||||
pkgs=$(go list ./... | sed -e "s,^${PKG_PREFIX}/\?,," | grep -v ^contrib)
|
||||
pre_all_tests
|
||||
if [[ ${WAIT_FILES} ]]; then
|
||||
wait_for_files ${WAIT_FILES//:/ }
|
||||
@ -260,7 +251,7 @@ test_go_ceph() {
|
||||
setup_mirroring
|
||||
export MIRROR_CONF
|
||||
fi
|
||||
for pkg in "${pkgs[@]}"; do
|
||||
for pkg in ${pkgs}; do
|
||||
test_pkg "${pkg}" || test_failed "${pkg}"
|
||||
done
|
||||
post_all_tests
|
||||
|
Loading…
Reference in New Issue
Block a user