Skip to content

Comments

[DPTN-1307] Adding e2e and ut combined coverage checking scripts#2754

Merged
Tonix517 merged 3 commits intomainfrom
tonyz/impl_combined_cov_checking
Apr 30, 2025
Merged

[DPTN-1307] Adding e2e and ut combined coverage checking scripts#2754
Tonix517 merged 3 commits intomainfrom
tonyz/impl_combined_cov_checking

Conversation

@Tonix517
Copy link

Why this should be merged

Now e2e and unit test coverage data are merged and the combined coverage percentage is being checked in a script.
NEXT to add in GitHub action to invoke it.

How this works

borrowing part from https://github.com/ava-labs/avalanche-cli/blob/main/scripts/check_coverage_unit_test.sh

How this was tested

  • local run
COVERAGE_MODE=true ./scripts/build.sh 
COVERAGE_MODE=true ./scripts/run.e2e.sh
COVERAGE_MODE=true ./scripts/run.e2e.sh --filter "can stop and restart a deployed subnet non SOV"
./scripts/unit_test.sh
./scripts/check_total_coverage.sh
Screenshot 2025-04-17 at 3 25 57 PM Screenshot 2025-04-17 at 3 25 40 PM

How is this documented

@Tonix517 Tonix517 force-pushed the tonyz/impl_combined_cov_checking branch 7 times, most recently from 61993be to aaabe42 Compare April 18, 2025 16:58
@Tonix517 Tonix517 force-pushed the tonyz/impl_combined_cov_checking branch from b350310 to 2b2dd5a Compare April 23, 2025 17:36
@github-project-automation github-project-automation bot moved this from Backlog 🗄️ to In Progress 🏗 in avalanchego Apr 25, 2025
Copy link
Collaborator

@felipemadero felipemadero left a comment

Choose a reason for hiding this comment

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

If possible, please add a way to check coverage only for given files or directories.
This is to check partial improvements over a given feature.

@Tonix517 Tonix517 force-pushed the tonyz/impl_combined_cov_checking branch 3 times, most recently from 9c3de16 to 4ba6784 Compare April 28, 2025 18:56
return path.Join(usr.HomeDir, constants.APMDir)
}

func GetSnapshotsDir() string {
Copy link
Contributor

@sukantoraymond sukantoraymond Apr 30, 2025

Choose a reason for hiding this comment

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

Seems that this is not part of this PR? Is this PR meant to be on top of the stop local network PR? If so lets base this PR on top of the stop local network PR

Copy link
Author

Choose a reason for hiding this comment

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

yea i accidentally checked in the commits i cherry-picked. reverted.

@sukantoraymond
Copy link
Contributor

How is e2e coverage calculation done? Unit test can be done with go test, but e2e?

@Tonix517 Tonix517 force-pushed the tonyz/impl_combined_cov_checking branch from 4ba6784 to c5ce264 Compare April 30, 2025 17:34
@Tonix517
Copy link
Author

Tonix517 commented Apr 30, 2025

ginkgo can be treated as a wrapper to go test. it exposes arguments that we use for coverage as go test. but e2e coverage report requires CLI binary to be built with -cover

How is e2e coverage calculation done? Unit test can be done with go test, but e2e?

Copy link
Collaborator

@felipemadero felipemadero left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from In Progress 🏗 to In Review 👀 in avalanchego Apr 30, 2025
@Tonix517 Tonix517 merged commit 7623bd7 into main Apr 30, 2025
37 checks passed
@Tonix517 Tonix517 deleted the tonyz/impl_combined_cov_checking branch April 30, 2025 20:25
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in avalanchego Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants