Patchwork [2,of,3] test-chg: run only with chg

login
register
mail settings
Submitter Yuya Nishihara
Date April 8, 2016, 3:23 p.m.
Message ID <369d151ba12b38708c9e.1460129038@mimosa>
Download mbox | patch
Permalink /patch/14431/
State Superseded
Commit 148a9a5379f050ed3ba6a677bf2ece0c547ccd13
Headers show

Comments

Yuya Nishihara - April 8, 2016, 3:23 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1458511143 25200
#      Sun Mar 20 14:59:03 2016 -0700
# Node ID 369d151ba12b38708c9e8094c157a56bb52e2d1f
# Parent  346e013b362fcbb5146c6167cea35bdb14c848ec
test-chg: run only with chg

It doesn't make sense to run test-chg.t without chg, so ignore it with vanilla
hg. test-chg.t can host chg-specific tests.
Pierre-Yves David - April 13, 2016, 6:56 a.m.
On 04/08/2016 08:23 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1458511143 25200
> #      Sun Mar 20 14:59:03 2016 -0700
> # Node ID 369d151ba12b38708c9e8094c157a56bb52e2d1f
> # Parent  346e013b362fcbb5146c6167cea35bdb14c848ec
> test-chg: run only with chg

That test is a bit strange to me. I would expect we would have a test 
that use chg no matter what and check that the basic are still working. 
Instead it seems we have a test that catch some chg corner case but only 
actually exercise them when --chg is passed.
Yuya Nishihara - April 13, 2016, 2:45 p.m.
On Tue, 12 Apr 2016 23:56:31 -0700, Pierre-Yves David wrote:
> On 04/08/2016 08:23 AM, Yuya Nishihara wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya@tcha.org>
> > # Date 1458511143 25200
> > #      Sun Mar 20 14:59:03 2016 -0700
> > # Node ID 369d151ba12b38708c9e8094c157a56bb52e2d1f
> > # Parent  346e013b362fcbb5146c6167cea35bdb14c848ec
> > test-chg: run only with chg  
> 
> That test is a bit strange to me. I would expect we would have a test 
> that use chg no matter what and check that the basic are still working. 
> Instead it seems we have a test that catch some chg corner case but only 
> actually exercise them when --chg is passed.

We try hard to make all tests pass with --chg, which should cover the
basics. On the other hand, we need tests for chg-specific issues such as
stale cache.

Maybe we can rename the test to something like test-chg-issues.t.
Pierre-Yves David - April 13, 2016, 5:48 p.m.
On 04/13/2016 07:45 AM, Yuya Nishihara wrote:
> On Tue, 12 Apr 2016 23:56:31 -0700, Pierre-Yves David wrote:
>> On 04/08/2016 08:23 AM, Yuya Nishihara wrote:
>>> # HG changeset patch
>>> # User Yuya Nishihara <yuya@tcha.org>
>>> # Date 1458511143 25200
>>> #      Sun Mar 20 14:59:03 2016 -0700
>>> # Node ID 369d151ba12b38708c9e8094c157a56bb52e2d1f
>>> # Parent  346e013b362fcbb5146c6167cea35bdb14c848ec
>>> test-chg: run only with chg
>> That test is a bit strange to me. I would expect we would have a test
>> that use chg no matter what and check that the basic are still working.
>> Instead it seems we have a test that catch some chg corner case but only
>> actually exercise them when --chg is passed.
> We try hard to make all tests pass with --chg, which should cover the
> basics. On the other hand, we need tests for chg-specific issues such as
> stale cache.
>
> Maybe we can rename the test to something like test-chg-issues.t.

Can we explicitly enable and test chg in this tests? (replacing all '$ 
hg' with '$ chg' ?
Yuya Nishihara - April 14, 2016, 4:19 p.m.
On Wed, 13 Apr 2016 10:48:45 -0700, Pierre-Yves David wrote:
> On 04/13/2016 07:45 AM, Yuya Nishihara wrote:
> > On Tue, 12 Apr 2016 23:56:31 -0700, Pierre-Yves David wrote:  
> >> On 04/08/2016 08:23 AM, Yuya Nishihara wrote:  
> >>> # HG changeset patch
> >>> # User Yuya Nishihara <yuya@tcha.org>
> >>> # Date 1458511143 25200
> >>> #      Sun Mar 20 14:59:03 2016 -0700
> >>> # Node ID 369d151ba12b38708c9e8094c157a56bb52e2d1f
> >>> # Parent  346e013b362fcbb5146c6167cea35bdb14c848ec
> >>> test-chg: run only with chg  
> >> That test is a bit strange to me. I would expect we would have a test
> >> that use chg no matter what and check that the basic are still working.
> >> Instead it seems we have a test that catch some chg corner case but only
> >> actually exercise them when --chg is passed.  
> > We try hard to make all tests pass with --chg, which should cover the
> > basics. On the other hand, we need tests for chg-specific issues such as
> > stale cache.
> >
> > Maybe we can rename the test to something like test-chg-issues.t.  
> 
> Can we explicitly enable and test chg in this tests? (replacing all '$ 
> hg' with '$ chg' ?

Yeah, that should be possible if the test is guarded by #require chg. I'll
take a look.

Patch

diff --git a/tests/test-chg.t b/tests/test-chg.t
--- a/tests/test-chg.t
+++ b/tests/test-chg.t
@@ -1,3 +1,5 @@ 
+#require chg
+
 init repo
 
   $ hg init foo