[Request] [+ ] D9728: rhg: use a release-mode executable in tests

SimonSapin phabricator at mercurial-scm.org
Tue Jan 12 17:41:20 UTC 2021


SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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 "$@"

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9728

AFFECTED FILES
  tests/test-rhg.t

CHANGE DETAILS

diff --git a/tests/test-rhg.t b/tests/test-rhg.t
--- a/tests/test-rhg.t
+++ b/tests/test-rhg.t
@@ -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



To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210112/418abd51/attachment.html>


More information about the Mercurial-patches mailing list