Skip to content
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

Refactor integration_test/schemaops to allow for fast iteration when developing generated code. #821

Merged
merged 4 commits into from
Apr 24, 2023

Conversation

wenovus
Copy link
Collaborator

@wenovus wenovus commented Apr 20, 2023

  • Split integration_tests/schemaops/testschema into ctestschema and utestschema (compressed, uncompressed respectively) to allow for testing of both types of generated code.
  • Renamed integration_tests/schemaops/testschema/yang/testschema.yang to integration_tests/schemaops/yang/utestschema.yang
  • Added integration_tests/schemaops/yang/ctestschema.yang
  • Generated code added for both ctestschema/utestschema for testing.

Now can just do go generate ./... && go test to test the current code generator end-to-end. Developing code generation and ygot helpers by testing end-to-end is faster than testing piecewise, for example

  1. writing unit tests of snippets (time consuming), and
  2. writing out what the generated code should look like (time consuming) and then testing the helpers against them.

@wenovus wenovus requested review from DanG100 and bormanp April 20, 2023 21:30
@github-actions
Copy link

github-actions bot commented Apr 20, 2023

Coverage Status

Coverage: 90.204%. Remained the same when pulling 496d55c on refactor-schemaops into 69ee45f on master.

@DanG100
Copy link
Contributor

DanG100 commented Apr 20, 2023

Can you include brief summary of what's changed. Diff is large and includes generated files/

Base automatically changed from factor-out-listgen to master April 21, 2023 22:20
@wenovus
Copy link
Collaborator Author

wenovus commented Apr 21, 2023

Can you include brief summary of what's changed. Diff is large and includes generated files/

Done

@wenovus wenovus merged commit 4cd47b4 into master Apr 24, 2023
@wenovus wenovus deleted the refactor-schemaops branch April 24, 2023 16:49
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.

2 participants