]>
git.proxmox.com Git - ceph.git/blob - ceph/src/test/run-cli-tests
4 SRCDIR
="$(dirname "$0")"
6 # build directory, if different, can be passed as an argument;
7 # it is expected to point to the equivalent subdirectory of the
8 # tree as where this script is stored
12 # not set or looks like a flag to cram
15 # looks like the builddir
21 VENV
="$BUILDDIR/virtualenv"
22 CRAM_BIN
="$VENV/bin/cram"
23 if [ ! -e "$CRAM_BIN" ]; then
24 # With "make distcheck", the source directory must be read-only. I
25 # patched cram to support that. See upstream ticket at
26 # https://bitbucket.org/brodie/cram/issue/9/allow-read-only-directories-for-t
28 python3
-m venv
"$VENV" && $VENV/bin
/pip
--log "$VENV"/log.txt \
29 install git
+https
://github.com
/ceph
/cram.git@
0.7-error-dir#egg=cram
32 SRCDIR_ABS
="$(readlink -f "$SRCDIR")"
33 BUILDDIR_ABS
="$(readlink -f "$BUILDDIR")"
34 FAKE_HOME
="$BUILDDIR_ABS/fake_home"
37 # cram doesn't like seeing the same foo.t basename twice on the same
38 # run, so run it once per directory
41 for tool
in "$SRCDIR"/cli
/*; do
42 toolname
="$(basename "$tool")"
43 install -d -m0755 -- "$BUILDDIR/cli/$toolname"
45 PATH
="$BUILDDIR_ABS/..:$SRCDIR_ABS/..:$PATH" \
47 CEPH_ARGS
="--no-mon-config" \
48 CCACHE_DIR
="$CCACHE_DIR" \
52 "$SRCDIR/run-cli-tests-maybe-unset-ccache" \
53 "$CRAM_BIN" -v "$@" --error-dir="$BUILDDIR/cli/$toolname" -- "$tool"/*.t
56 FAILEDTOOLS
="$FAILEDTOOLS $toolname"
60 if [ $FAILED -eq 1 ]; then
61 echo "Tests that failed: $FAILEDTOOLS"