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