2011-01-12 00:43:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if ! command -v pip >/dev/null; then
|
|
|
|
echo "$0: PIP not installed, skipping python-using tests." 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
HERE="$(dirname "$0")"
|
|
|
|
VENV="$HERE/virtualenv"
|
|
|
|
CRAM_BIN="$VENV/bin/cram"
|
|
|
|
if [ ! -e "$CRAM_BIN" ]; then
|
2011-01-12 21:28:11 +00:00
|
|
|
pip -E "$VENV" install "$HERE/downloads/cram-0.5.tar.gz"
|
2011-01-12 00:43:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
HERE_ABS="$(readlink -f "$HERE")"
|
|
|
|
|
|
|
|
# cram doesn't like seeing the same foo.t basename twice on the same
|
|
|
|
# run, so run it once per directory
|
|
|
|
for tool in "$HERE"/cli/*; do
|
|
|
|
PATH="$HERE_ABS/..:$PATH" "$CRAM_BIN" -v "$@" -- "$tool"/*.t
|
|
|
|
done
|