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