rhg: use a release-mode executable in tests
authorSimon Sapin <simon.sapin@octobus.net>
Tue, 12 Jan 2021 18:36:22 +0100
changeset 46228 e73b40c790ec
parent 46227 5bae4bc9bd42
child 46229 52abb1af2995
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
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