Closed Bug 1434938 Opened 7 years ago Closed 7 years ago

When there are no valid records, the lcov rewriter is failing to print a warning

Categories

(Testing :: Code Coverage, defect)

defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: marco, Assigned: marco)

Details

Attachments

(1 file)

No description provided.
> [task 2018-01-31T19:13:37.348Z] 19:13:37 ERROR - Exception during post-action for run-tests: Traceback (most recent call last): > [task 2018-01-31T19:13:37.348Z] 19:13:37 ERROR - File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 2010, in run_action > [task 2018-01-31T19:13:37.348Z] 19:13:37 ERROR - method(action, success=success and self.return_code == 0) > [task 2018-01-31T19:13:37.349Z] 19:13:37 ERROR - File "/builds/worker/workspace/mozharness/mozharness/mozilla/testing/codecoverage.py", line 176, in _package_coverage_data > [task 2018-01-31T19:13:37.349Z] 19:13:37 ERROR - rewriter.rewrite_files(jsvm_files, 'jsvm_lcov_output.info', '') > [task 2018-01-31T19:13:37.349Z] 19:13:37 ERROR - File "/builds/worker/workspace/build/tests/mozbuild/codecoverage/lcov_rewriter.py", line 650, in rewrite_files > [task 2018-01-31T19:13:37.349Z] 19:13:37 ERROR - print("WARNING: No valid records found in %s" % in_path) > [task 2018-01-31T19:13:37.350Z] 19:13:37 ERROR - UnboundLocalError: local variable 'in_path' referenced before assignment
Attached patch PatchSplinter Review
Attachment #8947487 - Flags: review?(cmanchester)
Comment on attachment 8947487 [details] [diff] [review] Patch Review of attachment 8947487 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for fixing this! ::: python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py @@ +646,5 @@ > with open(in_path + output_suffix, 'w+') as out_fh: > lcov_file.print_file(out_fh, rewrite_source, self.pp_rewriter.rewrite_record) > > if not found_valid[0]: > + print("WARNING: No valid records found in %s" % str(in_paths)) I doubt the "str" here is necessary.
Attachment #8947487 - Flags: review?(cmanchester) → review+
Pushed by mcastelluccio@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f874767f636f Fix printing warning when there are no valid records in the JSVM info files. r=chmanchester
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: