Fix invocation of runtest.py (#1660)
authorBruce Forstall <brucefo@microsoft.com>
Mon, 13 Jan 2020 09:50:13 +0000 (01:50 -0800)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 13 Jan 2020 09:50:13 +0000 (10:50 +0100)
If you pass arguments to runtest.cmd, the argument parsing "shift"
commands will lose the `%0` argument, so using `%~dp0` to find
the script location no longer works.

Use the cached script location to invoke runtest.py.

src/coreclr/tests/runtest.cmd

index 86a4a18cdee247ac16bd1006f06e20b9c5bcc104..7d5fd923888511067ef650067633ef97810ae4a7 100644 (file)
@@ -185,7 +185,7 @@ if defined RunInUnloadableContext (
     set __RuntestPyArgs=%__RuntestPyArgs% --run_in_context
 )
 
-set NEXTCMD=python "%~dp0runtest.py" %__RuntestPyArgs%
+set NEXTCMD=python "%__ProjectDir%\runtest.py" %__RuntestPyArgs%
 echo !NEXTCMD!
 !NEXTCMD!