Patchwork [1,of,5] tests: filter out uninteresting log events

login
register
mail settings
Submitter Yuya Nishihara
Date Dec. 16, 2018, 8:30 a.m.
Message ID <f52cf621f392643960ac.1544949034@mimosa>
Download mbox | patch
Permalink /patch/37205/
State New
Headers show

Comments

Yuya Nishihara - Dec. 16, 2018, 8:30 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1544863934 -32400
#      Sat Dec 15 17:52:14 2018 +0900
# Node ID f52cf621f392643960ac3cb5ff7bb17059bd040a
# Parent  9143ecd26b985bc6a8d4d2dad5d30f2de0a2d3a7
tests: filter out uninteresting log events

This helps adding more log()s without updating the tests.

Patch

diff --git a/tests/test-blackbox.t b/tests/test-blackbox.t
--- a/tests/test-blackbox.t
+++ b/tests/test-blackbox.t
@@ -22,6 +22,9 @@  setup
   > [alias]
   > confuse = log --limit 3
   > so-confusing = confuse --style compact
+  > [blackbox]
+  > track = backupbundle, branchcache, command, commandalias, commandexception,
+  >         commandfinish, debug, exthook, incoming, pythonhook, tagscache
   > EOF
 
   $ hg init blackboxtest
diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t
--- a/tests/test-devel-warnings.t
+++ b/tests/test-devel-warnings.t
@@ -83,6 +83,8 @@ 
   > blackbox=
   > [devel]
   > all-warnings=1
+  > [blackbox]
+  > track = command, commandexception, commandfinish, develwarn
   > EOF
 
   $ hg init lock-checker
diff --git a/tests/test-merge-subrepos.t b/tests/test-merge-subrepos.t
--- a/tests/test-merge-subrepos.t
+++ b/tests/test-merge-subrepos.t
@@ -57,7 +57,8 @@  Test that dirty is consistent through su
 
 A deleted subrepo file is flagged as dirty, like the top level repo
 
-  $ hg id --config extensions.blackbox= --config blackbox.dirty=True
+  $ hg id --config extensions.blackbox= --config blackbox.dirty=True \
+  > --config blackbox.track='command commandfinish'
   9bfe45a197d7+ tip
   $ cat .hg/blackbox.log
   * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !)
diff --git a/tests/test-obsolete-tag-cache.t b/tests/test-obsolete-tag-cache.t
--- a/tests/test-obsolete-tag-cache.t
+++ b/tests/test-obsolete-tag-cache.t
@@ -4,6 +4,9 @@ 
   > rebase=
   > mock=$TESTDIR/mockblackbox.py
   > 
+  > [blackbox]
+  > track = command, commandfinish, tagscache
+  > 
   > [experimental]
   > evolution.createmarkers=True
   > EOF
diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -543,14 +543,14 @@  fixed in 86c35b7ae300:
   > unrandomsample = $TESTTMP/unrandomsample.py
   > EOF
 
-  $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox=
+  $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \
+  > --config blackbox.track='command commandfinish discovery'
   comparing with r2
   searching for changes
   101 102 103 104 105 106 107 108 109 110  (no-eol)
-  $ hg -R r1 --config extensions.blackbox= blackbox
+  $ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track=
   * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
   * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
   * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 2 roundtrips in *.????s (glob)
   * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
-  * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 --config *extensions.blackbox=* blackbox (glob)
   $ cd ..
diff --git a/tests/test-tags.t b/tests/test-tags.t
--- a/tests/test-tags.t
+++ b/tests/test-tags.t
@@ -4,6 +4,8 @@  setup
   > [extensions]
   > blackbox=
   > mock=$TESTDIR/mockblackbox.py
+  > [blackbox]
+  > track = command, commandfinish, tagscache
   > EOF
 
 Helper functions: