Patchwork D2236: tests: remove use of bashism $RANDOM to fix test-narrow.t on non-bash shells

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 11:03 p.m.
Message ID <differential-rev-PHID-DREV-3r7bc7yyg7krsc54h23a-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27852/
State Superseded
Headers show

Comments

phabricator - Feb. 13, 2018, 11:03 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This test passed on our workstations, including on Macs, so we never
  noticed, but it fails on both the Linux and FreeBSD buildbots. Today I
  learned about a bash feature, wherein $RANDOM gives a random int every
  time you read it.
  
  check-code rule to follow.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-narrow.t

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-narrow.t b/tests/test-narrow.t
--- a/tests/test-narrow.t
+++ b/tests/test-narrow.t
@@ -51,7 +51,7 @@ 
   [255]
 
 Names with '.' in them are OK.
-  $ hg clone --narrow ssh://user@dummy/master $RANDOM --include a/.b/c
+  $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c
   requesting all changes
   adding changesets
   adding manifests