diff tests/test-rhg.t @ 46228:e73b40c790ec

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
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 12 Jan 2021 18:36:22 +0100
parents 9eb07ab3f2d4
children 02d3bb972121
line wrap: on
line diff
--- 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