瀏覽代碼

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)
Nick Mathewson 7 年之前
父節點
當前提交
12f58b42a8
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/test/test_rust.sh

+ 3 - 1
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