Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Issue 4007008: Robustify printing of test errors to stderr. (Closed)

Created:
10 years, 2 months ago by sosa
Modified:
9 years, 6 months ago
Reviewers:
kmixter1
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Robustify printing of test errors to stderr. Change-Id: I1e5da670437ce6574910a34d09b30aa80aee6f4f BUG=8056 TEST=Ran it with tests that both succeeded and failed. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=5e0909a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -5 lines) Patch
M generate_test_report.py View 1 chunk +10 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sosa
10 years, 2 months ago (2010-10-22 18:48:37 UTC) #1
kmixter1
10 years, 2 months ago (2010-10-22 18:56:59 UTC) #2
LGTM, but add BUG=8056 :)

On Fri, Oct 22, 2010 at 11:48 AM,  <sosa@chromium.org> wrote:
> Reviewers: kmixter1,
>
> Description:
> Robustify printing of test errors to stderr.
>
> Change-Id: I1e5da670437ce6574910a34d09b30aa80aee6f4f
>
> BUG=
> TEST=Ran it with tests that both succeeded and failed.
>
> Please review this at http://codereview.chromium.org/4007008/show
>
> SVN Base: http://git.chromium.org/git/crosutils.git
>
> Affected files:
>  M generate_test_report.py
>
>
> Index: generate_test_report.py
> diff --git a/generate_test_report.py b/generate_test_report.py
> index
>
8ff12df24e933bce7e09c4341df153ea16d871bb..97c3ec6f0da48e921caaa4eb2c11774ed3d84573
> 100755
> --- a/generate_test_report.py
> +++ b/generate_test_report.py
> @@ -216,11 +216,16 @@ class ReportGenerator(object):
>         for path in glob.glob(debug_file_regex):
>           try:
>             fh = open(path)
> -            print ('\n========== DEBUG FILE %s FOR TEST %s
> ==============\n' % (
> -                   path, test))
> -            print fh.read()
> -            print('\n=========== END DEBUG %s FOR TEST %s
> ===============\n' % (
> -                   path, test))
> +            print >> sys.stderr, (
> +                '\n========== DEBUG FILE %s FOR TEST %s ==============\n' %
> (
> +                path, test))
> +            out = fh.read()
> +            while out:
> +              print >> sys.stderr, out
> +              out = fh.read()
> +            print >> sys.stderr, (
> +                 '\n=========== END DEBUG %s FOR TEST %s ===============\n'
> % (
> +                 path, test))
>             fh.close()
>           except:
>             print 'Could not open %s' % path
>
>
>

Powered by Google App Engine
This is Rietveld 408576698