tests/run-tests.py
branchstable
changeset 1369 1161be3ff133
parent 1368 27b5b55ff3d3
child 1370 d6cab997a43e
equal deleted inserted replaced
1368:27b5b55ff3d3 1369:1161be3ff133
   147         help="output files annotated with coverage")
   147         help="output files annotated with coverage")
   148     parser.add_option("-c", "--cover", action="store_true",
   148     parser.add_option("-c", "--cover", action="store_true",
   149         help="print a test coverage report")
   149         help="print a test coverage report")
   150     parser.add_option("-d", "--debug", action="store_true",
   150     parser.add_option("-d", "--debug", action="store_true",
   151         help="debug mode: write output of test scripts to console"
   151         help="debug mode: write output of test scripts to console"
   152              " rather than capturing and diff'ing it (disables timeout)")
   152              " rather than capturing and diffing it (disables timeout)")
   153     parser.add_option("-f", "--first", action="store_true",
   153     parser.add_option("-f", "--first", action="store_true",
   154         help="exit on the first test failure")
   154         help="exit on the first test failure")
   155     parser.add_option("-H", "--htmlcov", action="store_true",
   155     parser.add_option("-H", "--htmlcov", action="store_true",
   156         help="create an HTML report of the coverage of the files")
   156         help="create an HTML report of the coverage of the files")
   157     parser.add_option("-i", "--interactive", action="store_true",
   157     parser.add_option("-i", "--interactive", action="store_true",
   598         # el is an invalid regex
   598         # el is an invalid regex
   599         return False
   599         return False
   600 
   600 
   601 def globmatch(el, l):
   601 def globmatch(el, l):
   602     # The only supported special characters are * and ? plus / which also
   602     # The only supported special characters are * and ? plus / which also
   603     # matches \ on windows. Escaping of these caracters is supported.
   603     # matches \ on windows. Escaping of these characters is supported.
   604     if el + '\n' == l:
   604     if el + '\n' == l:
   605         if os.altsep:
   605         if os.altsep:
   606             # matching on "/" is not needed for this line
   606             # matching on "/" is not needed for this line
   607             return '-glob'
   607             return '-glob'
   608         return True
   608         return True
   656     # SALT line number markers. The after table contains the
   656     # SALT line number markers. The after table contains the
   657     # non-active components, ordered by line number
   657     # non-active components, ordered by line number
   658     after = {}
   658     after = {}
   659     pos = prepos = -1
   659     pos = prepos = -1
   660 
   660 
   661     # Expected shellscript output
   661     # Expected shell script output
   662     expected = {}
   662     expected = {}
   663 
   663 
   664     # We keep track of whether or not we're in a Python block so we
   664     # We keep track of whether or not we're in a Python block so we
   665     # can generate the surrounding doctest magic
   665     # can generate the surrounding doctest magic
   666     inpython = False
   666     inpython = False