bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifications to sanity.sh to support MSVC binary


From: Jim Hyslop
Subject: Re: Modifications to sanity.sh to support MSVC binary
Date: Thu, 22 Jun 2006 13:10:44 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Spiro Trikaliotis wrote:
> * On Wed, Jun 21, 2006 at 09:54:55AM -0400 Jim Hyslop wrote:
>>One of the biggest stumbling blocks to getting the MSVC binary to work
>>with sanity.sh is the path convention (i.e. / vs. \).
> 
> I am not familiar with the CVS sources (or sanity.sh), but is this
> really necessary?
[...]
> Or do I misunderstand the problem at hand?

Sorry, I think I left out some explanations that would clarify things.

It's not the CVS source that needs to handle paths, it's the test
script. The reason this is so complicated is because the script is
designed to run in a UNIX-style environment, but the program itself
understands and prints only Windows path naming conventions.

As an example, the variable $CVSROOT_DIRNAME contains the path to the
test repository. The problem comes in when the script tries to compare
the program's output against $CVSROOT_DIRNAME. Here's a snippet of a
test chosen at random:

          dotest basic1-17-add-ci "${testcvs} -q status" \
"===================================================================
File: file2             Status: Up-to-date

   Working revision:    1\.1.*
   Repository revision: 1\.1    ${CVSROOT_DIRNAME}/first-dir/file2,v
   Commit Identifier:   ${commitid}
...etc...

For those who are unfamiliar with the dotest function, the parameters are:
- - Name of the test (basic1-17-add-ci)
- - command to execute (cvs -q status)
- - a regular expression indicating the expected output.

As it sits now, the test script will fail on the "Repository revision"
line, because dotest is given this regular expression to match (ignore
line wrapping in the next couple of examples):

   Repository revision: 1\.1 /tmp/cvs-sanity/cvsroot/first-dir/file2,v

but the actual output is

   Repository revision: 1.1
C:\cygwin\tmp\cvs-sanity/cvsroot/first-dir/file2,v

Note that CVS will print a mixture of \ and / in the path.

I can't just change $CVSROOT_DIRNAME, because the script itself uses it
in commands, such as:
   modify_repo mkdir $CVSROOT_DIRNAME/first-dir


So, to recap, my proposal is to use the posix_to_hostpath function to take
  /tmp/cvs-sanity/cvsroot

and convert it to the actual Windows path, in this case
  C:\cygwin\tmp\cvs-sanity\cvsroot

and then use the posix_to_hostpath_regex function to convert it to a
regular expression that accepts either path separator:
  C:[\\/]cygwin[\\/]tmp[\\/]...etc...



- --
Jim Hyslop
Dreampossible: Better software. Simply.     http://www.dreampossible.ca
                 Consulting * Mentoring * Training in
    C/C++ * OOD * SW Development & Practices * Version Management
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEms6oLdDyDwyJw+MRAsWcAJ9aPxpZKyC0ba/MN2vfA140kDV4eQCfdev2
DeHXVOAqvoBdAX4/q3jworU=
=hidK
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]