# HG changeset patch # User Simon Sapin # Date 1610472982 -3600 # Node ID e73b40c790eca02aed33345169729010a7b293e2 # Parent 5bae4bc9bd428a6e0542e4e2025f6ade7522aec4 rhg: use a release-mode executable in tests This allows the rhg build for test-rhg.t to share compiled dependencies such as hg-core with the hg-cpython build for other tests. For context, my wrapper script for the typical edit-compile-test cycle now looks like this: (cd rust && cargo +nightly-2020-10-04 fmt) (cd rust && cargo build --release -p rhg) make --silent local PURE=--rust python test/run-tests.py --local "$@" Differential Revision: https://phab.mercurial-scm.org/D9728 diff -r 5bae4bc9bd42 -r e73b40c790ec tests/test-rhg.t --- a/tests/test-rhg.t Wed Dec 30 00:14:28 2020 +0100 +++ b/tests/test-rhg.t Tue Jan 12 18:36:22 2021 +0100 @@ -2,8 +2,8 @@ Define an rhg function that will only run if rhg exists $ rhg() { - > if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then - > "$RUNTESTDIR/../rust/target/debug/rhg" "$@" + > if [ -f "$RUNTESTDIR/../rust/target/release/rhg" ]; then + > "$RUNTESTDIR/../rust/target/release/rhg" "$@" > else > echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg." > exit 80