tests: add a pattern to fix --pure tests stable
authorAugie Fackler <augie@google.com>
Sat, 27 Jan 2018 21:50:04 -0500
branchstable
changeset 41716 ab239e3de23bf4d8be614ee5852bf167b4cbcc18
parent 41715 784ac51f8bab7709641968f7efd160b60b8534f3
child 41789 4425790f2373201ba9efe5453cd563de40b0db17
child 41799 91c8d2e763d1ceb1ab1659a82aa9e9b6aca9bc7d
push id657
push usergszorc@mozilla.com
push dateTue, 30 Jan 2018 00:33:06 +0000
tests: add a pattern to fix --pure tests Test Plan: ran all tests with and without --pure, everything passed on gcc112. Differential Revision: https://phab.mercurial-scm.org/D1946
tests/common-pattern.py
tests/test-clone-uncompressed.t
tests/test-hgweb-commands.t
--- a/tests/common-pattern.py
+++ b/tests/common-pattern.py
@@ -3,16 +3,19 @@ from __future__ import absolute_import
 
 import os
 
 substitutions = [
     # list of possible compressions
     (br'(zstd,)?zlib,none,bzip2',
      br'$USUAL_COMPRESSIONS$'
     ),
+    (br'=(zstd,)?zlib',
+     br'=$BUNDLE2_COMPRESSIONS$'
+    ),
     # capabilities sent through http
     (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
      br'bookmarks%250A'
      br'changegroup%253D01%252C02%250A'
      br'digests%253Dmd5%252Csha1%252Csha512%250A'
      br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
      br'hgtagsfnodes%250A'
      br'listkeys%250A'
--- a/tests/test-clone-uncompressed.t
+++ b/tests/test-clone-uncompressed.t
@@ -34,17 +34,17 @@ Cannot stream clone when server.uncompre
 
 #if stream-legacy
   $ hg debugcapabilities http://localhost:$HGPORT
   Main capabilities:
     batch
     branchmap
     $USUAL_BUNDLE2_CAPS_SERVER$
     changegroupsubset
-    compression=zstd,zlib
+    compression=$BUNDLE2_COMPRESSIONS$
     getbundle
     httpheader=1024
     httpmediatype=0.1rx,0.1tx,0.2tx
     known
     lookup
     pushkey
     unbundle=HG10GZ,HG10BZ,HG10UN
     unbundlehash
@@ -99,17 +99,17 @@ Cannot stream clone when server.uncompre
 #endif
 #if stream-bundle2
   $ hg debugcapabilities http://localhost:$HGPORT
   Main capabilities:
     batch
     branchmap
     $USUAL_BUNDLE2_CAPS_SERVER$
     changegroupsubset
-    compression=zstd,zlib
+    compression=$BUNDLE2_COMPRESSIONS$
     getbundle
     httpheader=1024
     httpmediatype=0.1rx,0.1tx,0.2tx
     known
     lookup
     pushkey
     unbundle=HG10GZ,HG10BZ,HG10UN
     unbundlehash
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -1909,17 +1909,17 @@ raw graph
   
   
 
 capabilities
 
   $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities'; echo
   200 Script output follows
   
-  lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=*zlib (glob)
+  lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=$BUNDLE2_COMPRESSIONS$
 
 heads
 
   $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=heads'
   200 Script output follows
   
   cad8025a2e87f88c06259790adfa15acb4080123
 
@@ -2135,17 +2135,17 @@ capabilities
   unbundlehash
   batch
   stream-preferred
   streamreqs=generaldelta,revlogv1
   $USUAL_BUNDLE2_CAPS_SERVER$
   unbundle=HG10GZ,HG10BZ,HG10UN
   httpheader=1024
   httpmediatype=0.1rx,0.1tx,0.2tx
-  compression=*zlib (glob)
+  compression=$BUNDLE2_COMPRESSIONS$
 
 heads
 
 ERRORS ENCOUNTERED
 
   $ cat errors.log
   $ killdaemons.py