Skip to content

rewrite package codecov check, upload report #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 16, 2017

Conversation

yutongz
Copy link
Contributor

@yutongz yutongz commented Jun 8, 2017

No description provided.

@yutongz yutongz requested a review from sebastienvas June 8, 2017 22:49
@istio-testing
Copy link
Collaborator

This is a test.

@istio-testing
Copy link
Collaborator

Jenkins job test-infra/presubmit passed


var (
reportFile = flag.String("report_file", "codecov.report", "Package code coverage report.")
requirementFile = flag.String("requirement_file", "codecov.requirement", "Package code coverage requuirement.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type in requuirement

@yutongz
Copy link
Contributor Author

yutongz commented Jun 9, 2017

PTAL

@istio-testing
Copy link
Collaborator

This is a test.

@istio-testing
Copy link
Collaborator

Jenkins job test-infra/presubmit passed

Copy link
Contributor

@sebastienvas sebastienvas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

}
}()

scanner := bufio.NewScanner(f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please give the format of the text you are trying to parse. It would help the reviewer understand what you are doing.

return scanner.Err()
}

func (c *codecovChecker) checkRequirement() error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here. Please provide a sample requirement file.

scanner := bufio.NewScanner(f)
for scanner.Scan() {
parts := strings.Split(scanner.Text(), "\t")
if len(parts) == 2 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should you log a warning in the other case ?

@istio-testing
Copy link
Collaborator

This is a test.

1 similar comment
@istio-testing
Copy link
Collaborator

This is a test.

@istio-testing
Copy link
Collaborator

Jenkins job test-infra/presubmit passed

@yutongz
Copy link
Contributor Author

yutongz commented Jun 12, 2017

PTAL

Copy link
Contributor

@sebastienvas sebastienvas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

//Report example: "ok istio.io/mixer/adapter/denyChecker 0.023s coverage: 100.0% of statements"
//Report example: "? istio.io/mixer/adapter/denyChecker/config [no test files]"
//expected output: c.codeCoverage["istio.io/mixer/adapter/denyChecker"] = 100
for scanner.Scan() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very flaky. You should probably use a regular expression to extract the information.

@istio-testing
Copy link
Collaborator

This is a test.

@istio-testing
Copy link
Collaborator

Jenkins job test-infra/presubmit passed

@yutongz
Copy link
Contributor Author

yutongz commented Jun 16, 2017

PTAL

Copy link
Contributor

@sebastienvas sebastienvas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much easier to read. Thanks!

@istio-testing
Copy link
Collaborator

This is a test.

@istio-testing
Copy link
Collaborator

Jenkins job test-infra/presubmit passed

@yutongz yutongz merged commit 7673e5d into istio:master Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants