diff options
author | Tommi Virtanen <tv@hq.newdream.net> | 2011-01-13 21:59:11 +0100 |
---|---|---|
committer | Tommi Virtanen <tv@hq.newdream.net> | 2011-01-15 01:27:16 +0100 |
commit | 5045695cd8118c2b56a762fb8dbeb542bd05b5ac (patch) | |
tree | 6b51db6319ea21cafb917823b505f2e81121f94b /src/test/run-cli-tests | |
parent | Rename variable in run-cli-tests. (diff) | |
download | ceph-5045695cd8118c2b56a762fb8dbeb542bd05b5ac.tar.xz ceph-5045695cd8118c2b56a762fb8dbeb542bd05b5ac.zip |
Teach run-cli-tests about build dirs.
An optional argument points can tell it where to put
generated files (in this case, virtualenv). Provide
the argument in Makefile.am.
Options are still passed to cram, so you can say
"./src/test/run-cli-tests -i".
Diffstat (limited to 'src/test/run-cli-tests')
-rwxr-xr-x | src/test/run-cli-tests | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/test/run-cli-tests b/src/test/run-cli-tests index 24a2d2d4654..f2bd8194228 100755 --- a/src/test/run-cli-tests +++ b/src/test/run-cli-tests @@ -7,7 +7,23 @@ if ! command -v pip >/dev/null; then fi SRCDIR="$(dirname "$0")" -VENV="$SRCDIR/virtualenv" + +# build directory, if different, can be passed as an argument; +# it is expected to point to the equivalent subdirectory of the +# tree as where this script is stored +BUILDDIR="$SRCDIR" +case "$1" in + ''|-*) + # not set or looks like a flag to cram + ;; + *) + # looks like the builddir + BUILDDIR="$1" + shift + ;; +esac + +VENV="$BUILDDIR/virtualenv" CRAM_BIN="$VENV/bin/cram" if [ ! -e "$CRAM_BIN" ]; then pip -E "$VENV" install "$SRCDIR/downloads/cram-0.5.tar.gz" |