aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_rust.sh
AgeCommit message (Collapse)Author
2019-02-13Let's not double-quote EXTRA_CARGO_OPTIONS after allrl1987
2019-02-01Fix shellcheck warnings in test_rust.shrl1987
2018-10-01Fix segfaults related to sanitizers+jemallocAlex Crichton
It looks to be the case that Rust's standard allocator, jemalloc, is incompatible with sanitizers. The incompatibility, for whatever reason, seems to cause segfaults at runtime when jemalloc is linked with sanitizers. Without actually trying to figure out what's going on here this commit instead takes the hammer of "let's remove jemalloc when testing". The `tor_allocate` crate now by default switches to the system allocator (eventually this will want to be the tor allocator). Most crates then link to `tor_allocate` ot pick this up, but the `smartlist` crate had to manually switch to the system allocator in testing and the `external` crate had to be sure to link to `tor_allocate`. The final gotcha here is that this patch also switches to unconditionally passing `--target` to Cargo. For weird and arcane reasons passing `--target` with the host target of the compiler (which Cargo otherwise uses as the default) is different than not passing `--target` at all. This ensure that our custom `RUSTFLAGS` with sanitizer options doesn't make its way into build scripts, just the final testing artifacts.
2018-09-16Don't try to link C from rust doctests for nss detectionNick Mathewson
This is really annoying, since we can't use cfg(test) for doctests.
2018-08-10Revert "Rust: Use --all-features in test_rust.sh for 0.3.3 and 0.3.4"teor
This reverts commit e1291aa84a04b8006130ce08338ee07a662e5ce0.
2018-08-10Rust: Use --all-features in test_rust.sh for 0.3.3 and 0.3.4teor
Re-applies 0.3.3 changes after 24629.
2018-08-10Rust: use a consistent working directory in builds and teststeor
cd to ${abs_top_builddir}/src/rust before running cargo in src/test/test_rust.sh. Fixes bug 26497; bugfix on 0.3.3.2-alpha.
2018-08-10Fix $abs_top_srcdir in test_rust.shteor
Consistently use ../../.. as a fallback for $abs_top_srcdir in test_rust.sh. Fixes bug 27093; bugfix on 0.3.4.3-alpha.
2018-08-10Stop setting $CARGO_HOMEteor
cargo will use the user's $CARGO_HOME, or $HOME/.cargo by default. Fixes bug 26497; bugfix on 0.3.1.5-alpha.
2018-08-10Rust: backport src/test/test_rust.sh from masterteor
Preparation for 26497.
2017-07-13use CARGO_HOME instead of HOME when building with rustChelsea H. Komlo
2017-05-19Allow Rust build using locally supplied crates or crates.ioSebastian Hahn
This adds a couple of configure commands to control whether we're requiring all dependencies to be available locally (default) or not (--enable-cargo-online-mode). When building from a tarball, we require the RUST_DEPENDENCIES variable to point to the local repository of crates. This also adds src/ext/rust as a git submodule that contains such a local repository for easy setup.
2017-05-19cargo-online-mode configure argumentSebastian Hahn
Passing --enable-cargo-online-mode during configure allows cargo to make network requests while building Tor or running tests. If this flag is not supplied, the dependencies need to be available in the form of a local mirror.
2017-05-19Run cargo test during make checkSebastian Hahn