ceph/src/test/run-rbd-unit-tests.sh
Willem Jan Withagen e2f2929838 test/librbd: allow parallel runs of run-rbd-unit-tests
Running all tests sequential makes it the longest test of
`make check`, with each partial test taking around 500 sec.
Running 6 tests thus takes almost an hour.

Cut this down if ctest runs tests in parallel

Default behaviour of src/test/run-rbd-unit-tests.sh is kept:
  Without parameters the tests are run in sequence

To run unitttest_librbd with RBD_FEATURES, use `N` as parameter

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-09-03 20:06:22 -04:00

26 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
# this should be run from the src directory in the ceph.git
source $(dirname $0)/detect-build-env-vars.sh
PATH="$CEPH_BIN:$PATH"
if [ $# = 0 ]; then
# mimic the old behaviour
TESTS='0 1 61 109 127'
unset RBD_FEATURES; unittest_librbd
elif [ $# = 1 -a "${1}" = N ] ; then
# new style no feature request
unset RBD_FEATURES; unittest_librbd
else
TESTS="$*"
fi
for i in ${TESTS}
do
RBD_FEATURES=$i unittest_librbd
done
echo OK