Minor fix for currentframe (SF #1652788).
[python.git] / PCbuild8 / rt.bat
blob2e0aba33f2dbafd047fb213c078d2ed14640d1a5
1 @echo off\r
2 rem Run Tests.  Run the regression test suite.\r
3 rem Usage:  rt [-d] [-O] [-q] regrtest_args\r
4 rem -d   Run Debug build (python_d.exe).  Else release build.\r
5 rem -O   Run python.exe or python_d.exe (see -d) with -O.\r
6 rem -q   "quick" -- normally the tests are run twice, the first time\r
7 rem      after deleting all the .py[co] files reachable from Lib/.\r
8 rem      -q runs the tests just once, and without deleting .py[co] files.\r
9 rem All leading instances of these switches are shifted off, and\r
10 rem whatever remains is passed to regrtest.py.  For example,\r
11 rem     rt -O -d -x test_thread\r
12 rem runs\r
13 rem     python_d -O ../lib/test/regrtest.py -x test_thread\r
14 rem twice, and\r
15 rem     rt -q -g test_binascii\r
16 rem runs\r
17 rem     python_d ../lib/test/regrtest.py -g test_binascii\r
18 rem to generate the expected-output file for binascii quickly.\r
19 rem\r
20 rem Confusing:  if you want to pass a comma-separated list, like\r
21 rem     -u network,largefile\r
22 rem then you have to quote it on the rt line, like\r
23 rem     rt -u "network,largefile"\r
25 setlocal\r
27 set exe=python\r
28 set qmode=\r
29 set dashO=\r
30 PATH %PATH%;..\..\tcltk\bin\r
32 :CheckOpts\r
33 if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts\r
34 if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts\r
35 if "%1"=="-d" (set exe=python_d) & shift & goto CheckOpts\r
37 set cmd=%exe% %dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9\r
38 if defined qmode goto Qmode\r
40 echo Deleting .pyc/.pyo files ...\r
41 %exe% rmpyc.py\r
43 echo on\r
44 %cmd%\r
45 @echo off\r
47 echo About to run again without deleting .pyc/.pyo first:\r
48 pause\r
50 :Qmode\r
51 echo on\r
52 %cmd%\r