changeset 50623:99dfe806d2f3

test-treemanifest: cleanup the test to more easily show server side error This made my life easier debugging.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 29 May 2023 12:15:10 +0200
parents 822320591c46
children c2633c69cbe0
files tests/test-treemanifest.t
diffstat 1 files changed, 27 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-treemanifest.t	Thu Feb 02 17:26:10 2023 +0100
+++ b/tests/test-treemanifest.t	Mon May 29 12:15:10 2023 +0200
@@ -211,12 +211,14 @@
   (branch merge, don't forget to commit)
   $ hg ci -m 'merge of flat manifests to new flat manifest'
 
-  $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
-  $ cat hg.pid >> $DAEMON_PIDS
+  $ cd ..
+  $ hg -R repo-flat serve -p $HGPORT -d \
+  >   --pid-file=port-0-hg.pid \
+  >   --errorlog=port-0-errors.log
+  $ cat port-0-hg.pid >> $DAEMON_PIDS
 
 Create clone with tree manifests enabled
 
-  $ cd ..
   $ hg clone --config experimental.treemanifest=1 \
   >   http://localhost:$HGPORT repo-mixed -r 1
   adding changesets
@@ -226,6 +228,7 @@
   new changesets 5b02a3e8db7e:581ef6037d8b
   updating to branch default
   11 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat port-0-errors.log
   $ cd repo-mixed
   $ test -d .hg/store/meta
   [1]
@@ -654,9 +657,12 @@
   $ cp -R .hg/store-newcopy/. .hg/store
 
 Test cloning a treemanifest repo over http.
-  $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
-  $ cat hg.pid >> $DAEMON_PIDS
   $ cd ..
+  $ hg -R deeprepo serve -p $HGPORT -d \
+  >   --pid-file=port-0-hg.pid \
+  >   --errorlog=port-0-errors.log
+  $ cat port-0-hg.pid >> $DAEMON_PIDS
+
 We can clone even with the knob turned off and we'll get a treemanifest repo.
   $ hg clone --config experimental.treemanifest=False \
   >   --config experimental.changegroup3=True \
@@ -670,7 +676,8 @@
   updating to branch default
   8 files updated, 0 files merged, 0 files removed, 0 files unresolved
 No server errors.
-  $ cat deeprepo/errors.log
+  $ cat port-0-errors.log
+
 requires got updated to include treemanifest
   $ hg debugrequires -R deepclone | grep treemanifest
   treemanifest
@@ -713,12 +720,13 @@
   new changesets 775704be6f52:523e5c631710
   updating to branch default
   8 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd deeprepo-basicstore
-  $ hg debugrequires | grep store
+  $ hg -R deeprepo-basicstore debugrequires | grep store
   [1]
-  $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --errorlog=errors.log
-  $ cat hg.pid >> $DAEMON_PIDS
-  $ cd ..
+  $ hg -R deeprepo-basicstore serve -p $HGPORT1 -d \
+  >   --pid-file=port-1-hg.pid \
+  >   --errorlog=port-1-errors.log
+  $ cat port-1-hg.pid >> $DAEMON_PIDS
+
   $ hg clone --config format.usefncache=False \
   >   --config experimental.changegroup3=True \
   >   http://localhost:$HGPORT deeprepo-encodedstore
@@ -730,12 +738,12 @@
   new changesets 775704be6f52:523e5c631710
   updating to branch default
   8 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd deeprepo-encodedstore
-  $ hg debugrequires | grep fncache
+  $ hg -R deeprepo-encodedstore debugrequires | grep fncache
   [1]
-  $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log
-  $ cat hg.pid >> $DAEMON_PIDS
-  $ cd ..
+  $ hg -R deeprepo-encodedstore serve -p $HGPORT2 -d \
+  >   --pid-file=port-2-hg.pid \
+  >   --errorlog=port-2-errors.log
+  $ cat port-2-hg.pid >> $DAEMON_PIDS
 
 Local clone with basicstore
   $ hg clone -U deeprepo-basicstore local-clone-basicstore
@@ -756,6 +764,7 @@
   28 files to transfer, * of data (glob)
   transferred * in * seconds (*) (glob)
   $ hg -R stream-clone-basicstore verify -q
+  $ cat port-1-errors.log
 
 Stream clone with encodedstore
   $ hg clone --config experimental.changegroup3=True --stream -U \
@@ -764,6 +773,7 @@
   28 files to transfer, * of data (glob)
   transferred * in * seconds (*) (glob)
   $ hg -R stream-clone-encodedstore verify -q
+  $ cat port-2-errors.log
 
 Stream clone with fncachestore
   $ hg clone --config experimental.changegroup3=True --stream -U \
@@ -772,6 +782,7 @@
   22 files to transfer, * of data (glob)
   transferred * in * seconds (*) (glob)
   $ hg -R stream-clone-fncachestore verify -q
+  $ cat port-0-errors.log
 
 Packed bundle
   $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg