problem: run testsuite on Windows
Patrick Mézard
pmezard at gmail.com
Fri Apr 8 06:26:27 CDT 2011
Le 08/04/11 09:18, Friedrich, Anna-Christina a écrit :
> Hi,
>
> I am running tests (Batch-Files) on Windows using 'run-tests.py'.
> You did consider .bat-files, but unfortunately it doesn't work until you make two changes to the code:
We did, until one year and a half ago:
http://hg.intevation.org/mercurial/crew/rev/61642a4679e9
In fact, I am suprised you got something to work.
> 1. turn python into python.exe in run-tests.py
>
> @@ -344,8 +345,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)
I'd have to check this but why not.
> 2. change path in hg.bat
>
> @@ -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
This one should not be changed IMHO, the test setup should be fixed instead to reflect a regular one.
> Did anybody test this issue on Windows? Or is it intended to behave like this without my changes?
Few do, but not with batch files.
It is not intended to work at all without your changes.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list