tor/src/test/test_rust.sh
Nick Mathewson 1969d57363 Change our build process to run Cargo from inside the build tree
Instead of using the cwd to specify the location of Cargo.toml, we
use the --manifest-path option to specify its location explicitly.

This works around the bug that isis diagnosed on our jenkins builds.
2017-12-05 14:23:55 -05:00

21 lines
488 B
Bash
Executable File

#!/bin/sh
# Test all Rust crates
crates="protover tor_util smartlist tor_allocate"
exitcode=0
set -e
for crate in $crates; do
cd "${abs_top_builddir:-../../..}/src/rust"
CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \
CARGO_HOME="${abs_top_builddir:-../../..}/src/rust" \
"${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \
--manifest-path "${abs_top_srcdir:-.}/src/rust/${crate}/Cargo.toml" \
|| exitcode=1
cd -
done
exit $exitcode