Windows Tests

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu May 5 04:56:31 CDT 2011


On Thu, May 5, 2011 at 11:34 AM, Friedrich, Anna-Christina
<Anna-Christina.Friedrich at draeger.com> wrote:
> That's the hint I was looking for! Thanks a lot, Peter.
> Another problem:
> Commands separated by semicolon.
> As lots of different commands may contain semicolon it was not possible for me to extract those
> that separate two single commands.
> I turned those manually into two lines of batch code.

I'm not a bash wizard myself, but basically, everything enclosed in
"...", '...' or prefixed by \ is quoted and you should not split
commands there. Other semicolons should be splits. I'm hoping that we
don't have a lot of (...) and ${...}/`...` stuff going on as that
might be a pain to port. Here's a link to bash's reference manual and,
in particular, to the part about quoting:

  http://www.gnu.org/software/bash/manual/bashref.html
  http://www.gnu.org/software/bash/manual/bashref.html#Quoting

> Do we still discuss problems related to this thread? Maybe I should start a new one...?

Good idea.

Also, please note that on this list we reply _below_ the relevant part
of the message being replied to. As I'm doing here. It would be easier
if you did the same.

  http://mercurial.selenic.com/wiki/MailingLists#List_etiquette (see
"Please don't top post").

This said, please be assured that your efforts to make Hg's tests run
on Windows are greatly appreciated.

Cheers,
-parren

>
> -----Original Message-----
> From: Peter Arrenbrecht [mailto:peter.arrenbrecht at gmail.com]
> Sent: Donnerstag, 5. Mai 2011 10:52
> To: Friedrich, Anna-Christina
> Cc: Sune Foldager; Martin Geisler; Greg Ward; mercurial-devel at selenic.com
> Subject: Re: Windows Tests
>
> On Thu, May 5, 2011 at 10:37 AM, Friedrich, Anna-Christina <Anna-Christina.Friedrich at draeger.com> wrote:
>>
>> After converting to batch, you have to adjust the batch script once in a while.
>> For example:
>> I discovered that some .t tests contain comments using #.
>> On the other hand there are .t tests which use # inside hg commands, e.g. commit-comments or filenames.
>> Most of my tool does string search and replace. Therefore it is not
>> possible to automatically decide whether # introduces a comment or is used inside a command.
>> What I did is: deleting comments manually.
>>
>> I hope it is clear that prefixes wouldn't solve this problem?
>
> Not exactly. This specific instance is easily solved since # only starts a comment if preceded by whitespace. Using regexes you can easily differentiate these. If you compile a list of things where manual intervention was needed, maybe we can help finding ways to automate them.
> -parren
>
>>
>> -----Original Message-----
>> From: Peter Arrenbrecht [mailto:peter.arrenbrecht at gmail.com]
>> Sent: Donnerstag, 5. Mai 2011 10:14
>> To: Friedrich, Anna-Christina
>> Cc: Sune Foldager; Martin Geisler; Greg Ward;
>> mercurial-devel at selenic.com
>> Subject: Re: Windows Tests
>>
>> On Thu, May 5, 2011 at 10:06 AM, Friedrich, Anna-Christina <Anna-Christina.Friedrich at draeger.com> wrote:
>>> I know cmd.exe is not as powerful.
>>> Martin pointed out the right thing which is essential for our use of mercurial:
>>>
>>>>I think part of the fun is to run the commands using cmd.exe -- this
>>>>is what most users will end up doing, so if the test suite is to have
>>>>any value, we need to test in that environment.
>>>
>>>
>>> As I mentioned before, I implemented a converter tool, which made
>>> approximately 130 tests executable on Windows.
>>> The tool turns .t files into batch files. It is not perfect and once in a while you have to adjust some parts manually.
>>> The major benefit is that those tests run via cmd.exe.
>>
>> Can these "once in a while" things be addressed with Matt's (U) and
>> (W) prefixes so that your conversion would be fully automatic, that is, not requiring us to maintain tests as both .t and .bat files?
>> -parren
>> ---
>> This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.
>>
>> Diese Nachricht enthält vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfänger dieser E-mail sein, senden Sie bitte diese an den Absender zurück und löschen Sie die E-mail aus Ihrem System.
>>
>


More information about the Mercurial-devel mailing list