Allow test_rust.sh to run from outside the makefile

(This is just a matter of making sure that we handle the case where
abs_top_builddir is not set)
This commit is contained in:
Nick Mathewson 2017-10-27 12:54:52 -04:00
parent 6e08807b54
commit 12f58b42a8

View File

@ -5,9 +5,11 @@ crates="protover tor_util smartlist tor_allocate"
exitcode=0
set -e
for crate in $crates; do
cd "${abs_top_srcdir:-.}/src/rust/${crate}"
CARGO_TARGET_DIR="${abs_top_builddir}/src/rust/target" CARGO_HOME="${abs_top_builddir}/src/rust" "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} || exitcode=1
CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" CARGO_HOME="${abs_top_builddir:-../../..}/src/rust" "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} || exitcode=1
cd -
done