Show More
@@ -103,27 +103,26 b' def install_hg():' | |||
|
103 | 103 | os.chmod(os.path.join(BINDIR, 'hg'), 0700) |
|
104 | 104 | |
|
105 | 105 | def output_coverage(): |
|
106 | if coverage: | |
|
107 | vlog("# Producing coverage report") | |
|
108 | omit = [BINDIR, TESTDIR, PYTHONDIR] | |
|
109 | if not options.cover_stdlib: | |
|
110 | # Exclude as system paths (ignoring empty strings seen on win) | |
|
111 | omit += [x for x in sys.path if x != ''] | |
|
112 | omit = ','.join(omit) | |
|
113 | os.chdir(PYTHONDIR) | |
|
114 | cmd = '"%s" "%s" -r "--omit=%s"' % ( | |
|
115 | sys.executable, os.path.join(TESTDIR, 'coverage.py'), omit) | |
|
106 | vlog("# Producing coverage report") | |
|
107 | omit = [BINDIR, TESTDIR, PYTHONDIR] | |
|
108 | if not options.cover_stdlib: | |
|
109 | # Exclude as system paths (ignoring empty strings seen on win) | |
|
110 | omit += [x for x in sys.path if x != ''] | |
|
111 | omit = ','.join(omit) | |
|
112 | os.chdir(PYTHONDIR) | |
|
113 | cmd = '"%s" "%s" -r "--omit=%s"' % ( | |
|
114 | sys.executable, os.path.join(TESTDIR, 'coverage.py'), omit) | |
|
115 | vlog("# Running: "+cmd) | |
|
116 | os.system(cmd) | |
|
117 | if options.annotate: | |
|
118 | adir = os.path.join(TESTDIR, 'annotated') | |
|
119 | if not os.path.isdir(adir): | |
|
120 | os.mkdir(adir) | |
|
121 | cmd = '"%s" "%s" -a "--directory=%s" "--omit=%s"' % ( | |
|
122 | sys.executable, os.path.join(TESTDIR, 'coverage.py'), | |
|
123 | adir, omit) | |
|
116 | 124 | vlog("# Running: "+cmd) |
|
117 | 125 | os.system(cmd) |
|
118 | if options.annotate: | |
|
119 | adir = os.path.join(TESTDIR, 'annotated') | |
|
120 | if not os.path.isdir(adir): | |
|
121 | os.mkdir(adir) | |
|
122 | cmd = '"%s" "%s" -a "--directory=%s" "--omit=%s"' % ( | |
|
123 | sys.executable, os.path.join(TESTDIR, 'coverage.py'), | |
|
124 | adir, omit) | |
|
125 | vlog("# Running: "+cmd) | |
|
126 | os.system(cmd) | |
|
127 | 126 | |
|
128 | 127 | def run(cmd, split_lines=True): |
|
129 | 128 | """Run command in a sub-process, capturing the output (stdout and stderr). |
@@ -242,7 +241,8 b' try:' | |||
|
242 | 241 | tests += 1 |
|
243 | 242 | |
|
244 | 243 | print "\n# Ran %d tests, %d failed." % (tests, failed) |
|
245 |
|
|
|
244 | if coverage: | |
|
245 | output_coverage() | |
|
246 | 246 | finally: |
|
247 | 247 | cleanup_exit() |
|
248 | 248 |
General Comments 0
You need to be logged in to leave comments.
Login now