Instead of putting target/ and target_test/ in the source directory, we can tell our cargo script to put both target and our cargo-home in meson's build directory. In addition, makes tests and builds use the same target directory, significantly reducing the time it takes to run tests.
10 lines
183 B
Bash
Executable File
10 lines
183 B
Bash
Executable File
#! /usr/bin/sh
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
|
|
export CARGO_TARGET_DIR="$1/target/"
|
|
export CARGO_HOME="$CARGO_TARGET_DIR/cargo-home"
|
|
|
|
cargo test -j 1 -- --test-threads=1 --nocapture
|