unexpected output behaviour using test-suite on windows

Friedrich, Anna-Christina Anna-Christina.Friedrich at draeger.com
Wed Mar 23 03:14:51 CDT 2011


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

outputs help content but NOT 'test'.

Second example:

@echo off
echo test
hg init --help
@echo on

outputs 'test' AND help content.

Third example(similar to content of test-basic.t):

@echo off
rem Create a repository:
mkdir t
cd t
hg init
rem Make a changeset:
echo a > a
hg add a
hg commit -m test
rem This command is ancient:
hg history
rem Poke around at hashes:
hg manifest --debug
hg cat a
rem Verify should succeed:
hg verify
rem At the end...
@echo on

outputs nothing...

Any ideas why the output is so confusing?


Best regards,
Anna Friedrich


</PRE>
<meta content="text/html; charset=ISO-8859-1"
<font face="Arial"><font color="#BABABA"><SPAN style="FONT-SIZE: 8pt">---<br>
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.<br>
<font face="Arial"><font color="#BABABA"><SPAN style="FONT-SIZE: 8pt"><br>
<font face="Arial"><font color="#BABABA"><SPAN style="FONT-SIZE: 8pt">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.
<PRE> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110323/9670dd8a/attachment.htm>


More information about the Mercurial-devel mailing list