[Top][All Lists]

[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)

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}

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

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

and convert it to the actual Windows path, in this case

and then use the posix_to_hostpath_regex function to convert it to a
regular expression that accepts either path separator:

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


reply via email to

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