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

test(gnovm): test all files in gnovm/tests subdirs #2754

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

thehowl
Copy link
Member

@thehowl thehowl commented Sep 3, 2024

Changes the EvalFiles tests to support sub-directories in gnovm/tests, skipping the extern directory as it is used for imports.

Other changes mostly concern not having tests where some output lines terminate with spaces:

  • Changed FuncValue.String, so that in case of a closure value the signature is printed, as shown in the assign_unnamed_type tests.
  • Require all directives to be on a new line (mostly for consistency with 99% of the testing corpus)
  • use commas in some places instead of spaces; use ; for end of line on Println statements when they're supposed to print an empty string.
  • remove the leading space in the what the firetruck? tests.
Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@thehowl thehowl self-assigned this Sep 3, 2024
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.58%. Comparing base (c82e646) to head (b3996bb).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2754      +/-   ##
==========================================
+ Coverage   60.21%   60.58%   +0.36%     
==========================================
  Files         562      562              
  Lines       75031    75033       +2     
==========================================
+ Hits        45179    45456     +277     
+ Misses      26476    26222     -254     
+ Partials     3376     3355      -21     
Flag Coverage Δ
contribs/gnodev 61.40% <ø> (+0.81%) ⬆️
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 64.57% <ø> (ø)
gnovm 65.39% <100.00%> (+1.05%) ⬆️
misc/genstd 80.54% <ø> (ø)
misc/logos 20.23% <ø> (ø)
tm2 61.95% <ø> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@deelawn deelawn left a comment

Choose a reason for hiding this comment

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

Nice work. So until now, any tests in subdirectories weren't being executed? Good catch. I made a couple suggestions.

gnovm/pkg/gnolang/eval_test.go Show resolved Hide resolved
gnovm/pkg/gnolang/eval_test.go Show resolved Hide resolved
@thehowl
Copy link
Member Author

thehowl commented Sep 12, 2024

Nice work. So until now, any tests in subdirectories weren't being executed? Good catch. I made a couple suggestions.

They're only tested in gnovm/tests. Alas, the tests in gnovm/tests/files are checked twice. Ideally, I'd remove all Go code in gnovm/tests, so we can:

  1. remove filetests for users -- proposal: removing filetests for end-users #1346.
  2. have top-level tests/ directory be used as central points for integration tests.
  3. move code for the inner workings of gno test to cmd/gno or some other package in pkg.

But it's going to be a while before we get there.

@thehowl thehowl merged commit bde8afc into master Sep 12, 2024
119 checks passed
@thehowl thehowl deleted the dev/morgan/eval-test-full branch September 12, 2024 12:26
thehowl added a commit that referenced this pull request Sep 26, 2024
sorry, went ahead and merged before pushing the changes from [dylan's
comments](#2754 (review))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants