/PC/VS7.1/rt.bat

http://unladen-swallow.googlecode.com/ · Batch · 52 lines · 44 code · 8 blank · 0 comment · 6 complexity · 8c804b01edeb42abe18fbb8cc687f72b MD5 · raw file

  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. setlocal
  25. set exe=python
  26. set qmode=
  27. set dashO=
  28. PATH %PATH%;..\..\..\tcltk\bin
  29. :CheckOpts
  30. if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
  31. if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
  32. if "%1"=="-d" (set exe=python_d) & shift & goto CheckOpts
  33. set cmd=%exe% %dashO% -E -tt ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
  34. if defined qmode goto Qmode
  35. echo Deleting .pyc/.pyo files ...
  36. %exe% rmpyc.py
  37. echo on
  38. %cmd%
  39. @echo off
  40. echo About to run again without deleting .pyc/.pyo first:
  41. pause
  42. :Qmode
  43. echo on
  44. %cmd%