[darcs-users] darcs testing script question...

Tanksley, William D. Jr. WILLIAM.D.TANKSLEY.JR at saic.com
Mon Apr 12 16:03:23 UTC 2004


From: darcs-users-admin at abridgegame.org 

>On Fri, Apr 09, 2004 at 08:32:15AM -0700, David Brown wrote:
>>Aegis doesn't require that every change have tests that fail against 
>>the baseline.  It doesn't even require that each change have tests.  
>>It is specified per-test.  The main different is that in Aegis, the 
>>changes are described before they are implemented.  It can even be 
>>configured so that different people are responsible for creating the 
>>changes, than the developers who make them.

>Hmmm.  I see.  To do just this (that is, separate the creation 
>of tests from the code that passes them) wouldn't be so hard, 
>I think.  Making darcs have a clear idea of what is a test and 
>what is not would be a pain.

I wouldn't want to shoehorn this kind of thing into darcs itself -- I think
darcs is just fine as it is. I do, however, think that the testing script
would be a good place for it. Some simple rule, like perhaps any file
contained in a directory named "test" is a test, and "make test" will run
the appropriate build tests.

There's definitely more to it than this, but I don't think any of the
complexity matters to darcs, and I'm interested enough to be working on
getting this running, so I'll let you guys know as I get anything
interesting.

>  But I think one could create a 
>workflow based on first creating the tests (which might not be 
>passed) without too much trouble.  You'd just need to use 
>--no-test when creating non-passing tests.

Of course, the problem would be that this would create problems for other
developers. I don't think that allowing people to check in non-passing tests
to the baseline is a good idea.

>  There'd be no need 
>to have the same developer create the test and implement the 
>change.  The only catch is that the tests will fail in a given 
>repo until all of them have been implemented, so if you have 
>many tests being worked on at once, you might want to set up 
>one (probably temporary) repo per test.  Of course, if each 
>developer is writing his/her own tests, the temporary repos 
>would be their working directories.

I think that this, OTOH, is a great idea -- if you're going to create the
tests before the code, you should definitely have a separate repo.

But that's why darcs is so cool :-), all that stuff just works.

Speaking of which, I got the latest win32 client, and everything seems to
work properly. Good work! I do have a question, though -- I managed to get
myself a conflict that I don't know how to fix.

I did something like the following (I haven't tested this reduced sequence
to see if it recreates my situation, and won't have time until I get home):

darcs inittree
darcs pull /darcs/omega
cd omega
darcs mv tests ..
cd ..
darcs remove tests

'tests' was a directory.

Now, darcs record tells me that I've got a conflict, and this is the only
thing I can see as causing it. The problem is that I don't see how I'm
supposed to resolve the conflict, nor do I see why it *must* be considered a
conflict (it seems like a 'remove' should work with a 'move').

(I may be entirely wrong about what's actually causing the conflict -- let
me know if my story seems odd, and I'll get back to you as soon as I get
home, where I've got my actual records.)

>David Roundy

-Billy




More information about the darcs-users mailing list