diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 19:32:48 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 19:32:48 +0000 |
commit | e86c53989bd1190fd725668d1feb53f071969380 (patch) | |
tree | 13346be1b87488ade45e608cd9f9bd7d5e495ea3 | |
parent | 0e5603f8db3f1b072ec88a64cc314168497f8036 (diff) | |
download | chromium_src-e86c53989bd1190fd725668d1feb53f071969380.zip chromium_src-e86c53989bd1190fd725668d1feb53f071969380.tar.gz chromium_src-e86c53989bd1190fd725668d1feb53f071969380.tar.bz2 |
run_test_cases: Redirect stderr too. Improve output. Set default timeout to 120s.
The default timeout value is a bit random but no test should take 120 second so
the default value makes sense.
R=cmp@chromium.org
NOTRY=true
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10813002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147509 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | tools/isolate/run_test_cases.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/isolate/run_test_cases.py b/tools/isolate/run_test_cases.py index 933c7bb..cd3a2a9 100755 --- a/tools/isolate/run_test_cases.py +++ b/tools/isolate/run_test_cases.py @@ -269,7 +269,7 @@ class Progress(object): def update_item(self, name): with self.lock: self.index += 1 - self.next_line = '%d of %d (%.1f%%), %.1fs: %s' % ( + self.next_line = '[%d/%d] (%.1f%%) %.1fs: %s' % ( self.index, self.size, self.index * 100. / self.size, @@ -407,7 +407,7 @@ class Runner(object): for retry in range(self.retry_count): start = time.time() output, returncode = call_with_timeout( - cmd, self.timeout, cwd=self.cwd_dir) + cmd, self.timeout, cwd=self.cwd_dir, stderr=subprocess.STDOUT) duration = time.time() - start out.append( { @@ -419,9 +419,10 @@ class Runner(object): if returncode and retry != self.retry_count - 1: self.progress.increase_count() if retry: - self.progress.update_item('%s - %d' % (test_case, retry)) + self.progress.update_item( + '%s (%.2fs) - retry #%d' % (test_case, duration, retry)) else: - self.progress.update_item(test_case) + self.progress.update_item('%s (%.2fs)' % (test_case, duration)) if not returncode: break return out @@ -523,6 +524,7 @@ def main(): parser.add_option( '-t', '--timeout', type='int', + default=120, help='Timeout for a single test case, in seconds default:%default') parser.add_option( '-S', '--stats', |