X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=t%2Flib.sh;h=4d67341e5330c7e725ebb50915a7128a5e54c173;hb=bf67f94dd4f4096de4eee07a7dc377d6c889a016;hp=84b942137f882aaf138c47e05d867c5a8c7f113e;hpb=c7139a3fae51633f0f290ebf73f0cf5e4864e547;p=bup.git diff --git a/t/lib.sh b/t/lib.sh index 84b9421..4d67341 100644 --- a/t/lib.sh +++ b/t/lib.sh @@ -1,18 +1,23 @@ # Assumes shell is Bash, and pipefail is set. -bup_t_lib_script_home=$(cd "$(dirname $0)" && pwd) +bup_t_lib_script_home=$(cd "$(dirname $0)" && pwd) || exit $? + +bup-python() +{ + "$bup_t_lib_script_home/../cmd/bup-python" "$@" +} force-delete() { "$bup_t_lib_script_home/force-delete" "$@" } -realpath() +resolve-parent() { test "$#" -eq 1 || return $? echo "$1" | \ - PYTHONPATH="$bup_t_lib_script_home/../lib" python -c \ - "import sys, bup.helpers; print bup.helpers.realpath(sys.stdin.readline())" \ + PYTHONPATH="$bup_t_lib_script_home/../lib" bup-python -c \ + "import sys, bup.helpers; print(bup.helpers.resolve_parent(sys.stdin.readline()))" \ || return $? }