summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-19 21:43:49 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-19 21:43:49 (GMT)
commit2cfa9806c7b4e21e44f00593ccbaeded703382de (patch)
tree3bf073994d9ccec097619e06481da99a6bb83ca5 /PCbuild
parent6f77667a64e258c324013e35eb4f0e5e99469f7b (diff)
downloadcpython-2cfa9806c7b4e21e44f00593ccbaeded703382de.zip
cpython-2cfa9806c7b4e21e44f00593ccbaeded703382de.tar.gz
cpython-2cfa9806c7b4e21e44f00593ccbaeded703382de.tar.bz2
Run tests twice by default, first time deleting .pyc/.pyo files.
New option "-q" to leave .pyc/.pyo alone.
Diffstat (limited to 'PCbuild')
-rwxr-xr-xPCbuild/rt.bat22
1 files changed, 20 insertions, 2 deletions
diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat
index dd048cd..7773103 100755
--- a/PCbuild/rt.bat
+++ b/PCbuild/rt.bat
@@ -1,12 +1,30 @@
@rem Run Tests. Run the regression test suite.
@rem Plain "rt" runs Release build, arguments passed on to regrtest.
@rem "rt -d" runs Debug build similarly, after shifting off -d.
+@rem Normally the tests are run twice, the first time after deleting
+@rem all the .py[co] files from Lib/ and Lib/test. But
+@rem "rt -q" (for Quick) runs the tests just once, and without
+@rem bothering to delete .py[co] files.
@set _exe=python
-@if "%1" =="-d" set _exe=python_d
-@if "%1" =="-d" shift
+@set _qmode=no
+@if "%1"=="-q" set _qmode=yes
+@if "%1"=="-q" shift
+@if "%1"=="-d" set _exe=python_d
+@if "%1"=="-d" shift
+@if "%_qmode%"=="yes" goto LeavePyc
+@if "%1"=="-q" set _qmode=yes
+@if "%1"=="-q" shift
+@if "%_qmode%"=="yes" goto LeavePyc
+@echo Deleting .pyc/.pyo files ...
@del ..\Lib\*.pyc
@del ..\Lib\*.pyo
@del ..\Lib\test\*.pyc
@del ..\Lib\test\*.pyo
+:LeavePyc
%_exe% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+@if "%_qmode%"=="yes" goto Done
+@echo Running again without deleting .pyc/.pyo first:
+%_exe% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+:Done
@set _exe=
+@set _qmode=