source: python/vendor/Python-2.6.5/PCbuild/rt.bat

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1@echo off
2rem Run Tests. Run the regression test suite.
3rem Usage: rt [-d] [-O] [-q] [-x64] 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 -x64 Run the 64-bit build of python (or python_d if -d was specified)
10rem from the 'amd64' dir instead of the 32-bit build in this dir.
11rem All leading instances of these switches are shifted off, and
12rem whatever remains is passed to regrtest.py. For example,
13rem rt -O -d -x test_thread
14rem runs
15rem python_d -O ../lib/test/regrtest.py -x test_thread
16rem twice, and
17rem rt -q -g test_binascii
18rem runs
19rem python_d ../lib/test/regrtest.py -g test_binascii
20rem to generate the expected-output file for binascii quickly.
21rem
22rem Confusing: if you want to pass a comma-separated list, like
23rem -u network,largefile
24rem then you have to quote it on the rt line, like
25rem rt -u "network,largefile"
26
27setlocal
28
29set prefix=.\
30set suffix=
31set qmode=
32set dashO=
33set tcltk=
34
35:CheckOpts
36if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
37if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
38if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
39if "%1"=="-x64" (set prefix=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts
40
41PATH %PATH%;..\..\%tcltk%\bin
42set exe=%prefix%\python%suffix%
43set cmd=%exe% %dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
44if defined qmode goto Qmode
45
46echo Deleting .pyc/.pyo files ...
47%exe% rmpyc.py
48
49echo on
50%cmd%
51@echo off
52
53echo About to run again without deleting .pyc/.pyo first:
54pause
55
56:Qmode
57echo on
58%cmd%
Note: See TracBrowser for help on using the repository browser.