summaryrefslogtreecommitdiff
path: root/PCbuild/rt.bat
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-23 02:42:09 +0000
committerTim Peters <tim.peters@gmail.com>2001-01-23 02:42:09 +0000
commit755f4c1035b6c9aeb6eea8b6bfe7e8f7a273ce2b (patch)
treea135b30e266ee0674f2a7f8dfb05368346d374e8 /PCbuild/rt.bat
parent6ac3c7b58813bd9fb7447e4e52342c5306692a69 (diff)
downloadcpython-git-755f4c1035b6c9aeb6eea8b6bfe7e8f7a273ce2b.tar.gz
Added -O option (to run python or python_d w/ -O),
Diffstat (limited to 'PCbuild/rt.bat')
-rwxr-xr-xPCbuild/rt.bat22
1 files changed, 14 insertions, 8 deletions
diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat
index e8e5a758c1..4a4c97ec2e 100755
--- a/PCbuild/rt.bat
+++ b/PCbuild/rt.bat
@@ -2,28 +2,34 @@
@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 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.
+@rem "rt -O" runs python or python_d with -O (depending on -d).
@set _exe=python
@set _qmode=no
+@set _dashO=
+@goto CheckOpts
+:Again
+@shift
+:CheckOpts
+@if "%1"=="-O" set _dashO=-O
+@if "%1"=="-O" goto Again
@if "%1"=="-q" set _qmode=yes
-@if "%1"=="-q" shift
+@if "%1"=="-q" goto Again
@if "%1"=="-d" set _exe=python_d
-@if "%1"=="-d" shift
-@if "%_qmode%"=="yes" goto Qmode
-@if "%1"=="-q" set _qmode=yes
-@if "%1"=="-q" shift
+@if "%1"=="-d" goto Again
@if "%_qmode%"=="yes" goto Qmode
@echo Deleting .pyc/.pyo files ...
@del ..\Lib\*.pyc
@del ..\Lib\*.pyo
@del ..\Lib\test\*.pyc
@del ..\Lib\test\*.pyo
-%_exe% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+%_exe% %_dashO% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
@echo About to run again without deleting .pyc/.pyo first:
@pause
:Qmode
-%_exe% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+%_exe% %_dashO% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
@set _exe=
@set _qmode=
+@set _dashO=