[tor-commits] [tor/master] Allow test_rust.sh to run from outside the makefile

nickm at torproject.org nickm at torproject.org
Fri Oct 27 16:56:20 UTC 2017


commit 12f58b42a8adfeee09b140819819eee4108e22d8
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Oct 27 12:54:52 2017 -0400

    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)
---
 src/test/test_rust.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh
index 50740fd18..8d7900e1d 100755
--- a/src/test/test_rust.sh
+++ b/src/test/test_rust.sh
@@ -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
 



More information about the tor-commits mailing list