unexpected output behaviour using test-suite on windows

Friedrich, Anna-Christina Anna-Christina.Friedrich at draeger.com
Fri Mar 25 07:00:46 CDT 2011


Hello, 

Thanks a lot! 
"Call hg ..." returns the desired output. We have to use cmd for testing, because we are running hg with cmd. 

But what about the hg.bat file I had to adjust and the change in run-tests.py(as I mentioned in my previous mail).
Did anybody test this on Windows?

Best regards

Anna Friedrich

-----Original Message-----
From: Patrick Mézard [mailto:pmezard at gmail.com] 
Sent: Mittwoch, 23. März 2011 14:39
To: Friedrich, Anna-Christina
Cc: mercurial-devel at selenic.com
Subject: Re: unexpected output behaviour using test-suite on windows

Le 23/03/11 09:14, Friedrich, Anna-Christina a écrit :
> Hello,
> 
> I am running batch tests on winXP via run-tests.py using the current stable version from the developer repository(developing with eclipse).
> I had to adjust two parts of the code, so that it is possible to run hg commands in a batch file at all.
> 
> diff -r 643b8212813e contrib/win32/hg.bat
> --- a/contrib/win32/hg.bat      Wed Feb 16 15:02:30 2011 +0100
> +++ b/contrib/win32/hg.bat      Tue Mar 22 14:18:12 2011 +0100
> @@ -8,5 +8,5 @@
>  rem install does not put python.exe on the PATH...
>  rem %~dp0 is the directory of this script
> 
> -"%~dp0..\python" "%~dp0hg" %*
> +"%~dp0\python" "%~dp0hg" %*
>  endlocal
> 
> diff -r 643b8212813e tests/run-tests.py
> --- a/tests/run-tests.py        Wed Feb 16 15:02:30 2011 +0100
> +++ b/tests/run-tests.py        Tue Mar 22 14:18:12 2011 +0100
> @@ -344,8 +344,9 @@
>          os.symlink(sys.executable, mypython)
>      except AttributeError:
>          # windows fallback
> -        shutil.copyfile(sys.executable, mypython)
> -        shutil.copymode(sys.executable, mypython)
> +        mypythonexe = mypython + '.exe'
> +        shutil.copyfile(sys.executable, mypythonexe)
> +        shutil.copymode(sys.executable, mypythonexe)
> 
>  def installhg(options):
>      vlog("# Performing temporary installation of HG")
> 
> 
> Everything works as expected while using '-l' option, but while hg is installed in a temp file, output from console is not predictable.
> Sometimes there is output, sometimes not, sometimes just a part of the expected output.
> 
> First example:
> 
> @echo off
> hg init --help
> echo test
> @echo on

Try "call hg init --help" instead of "hg init --help".

FWIW, this is how I run tests on Windows:

  http://mercurial.selenic.com/wiki/WindowsTestingPlan

It is not easy, it is not pleasant but it works for at least 2/3 of them. I would not try with cmd.exe, it is way too underpowered to write anything else than trivial tests.

--
Patrick Mézard

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