Patchwork D10396: test-lfs: avoid a bashism when spawning the server

login
register
mail settings
Submitter phabricator
Date April 14, 2021, 2:47 p.m.
Message ID <differential-rev-PHID-DREV-irstr66b6rwuq7lqzs7v-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48712/
State Superseded
Headers show

Comments

phabricator - April 14, 2021, 2:47 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  For zsh, this &> call is read as "& >", this spin the process without
  redirection. As a result the server grab stdout, which does not get closed at the
  end of the test. As a result `run-tests.py` hang there forever, waiting for the
  the stream for be close. (which is probably as issue on its own).

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-lfs-test-server.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-lfs-test-server.t b/tests/test-lfs-test-server.t
--- a/tests/test-lfs-test-server.t
+++ b/tests/test-lfs-test-server.t
@@ -17,7 +17,7 @@ 
 #endif
 
 #if no-windows git-server
-  $ lfs-test-server &> lfs-server.log &
+  $ lfs-test-server > lfs-server.log 2>&1 &
   $ echo $! >> $DAEMON_PIDS
 #endif
 
@@ -890,7 +890,7 @@ 
   $ mkdir $TESTTMP/lfs-server2
   $ cd $TESTTMP/lfs-server2
 #if no-windows git-server
-  $ lfs-test-server &> lfs-server.log &
+  $ lfs-test-server > lfs-server.log 2>&1 &
   $ echo $! >> $DAEMON_PIDS
 #endif