-
Notifications
You must be signed in to change notification settings - Fork 379
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): migrate 'gno build' test to testscript #1103
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Like done for 'gno test', use testscript and txtar files to define the different test cases. The previous test was only testing `gno build` without arguments and files, so this PR adds more cases. Interestingly, the gno files are only used to determine the directories where the 'go build' command will be passed. This means only go file syntax is checked (gno file syntax is ignored, as pictured in `invalid_gno_files.txtar' case). Also a `go.mod` is required or else the command fails.
moul
approved these changes
Sep 6, 2023
Related with #1215. |
thehowl
approved these changes
Oct 12, 2023
3 tasks
7 tasks
gfanton
pushed a commit
to gfanton/gno
that referenced
this pull request
Oct 20, 2023
Like done for 'gno test', use testscript and txtar files to define the different test cases. The previous test was only testing `gno build` without arguments and files, so this PR adds more cases. Interestingly, the gno files are only used to determine the directories where the 'go build' command will be passed. This means only go file syntax is checked (gno file syntax is ignored, as pictured in `invalid_gno_files.txtar` case). Also a `go.mod` is required or else the command fails. Like the previous test, the new test can be run via ``` $ go test ./gnovm/cmd/gno -v -run Build ``` <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [x] 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 - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
thehowl
pushed a commit
to thehowl/gno
that referenced
this pull request
Oct 21, 2023
Like done for 'gno test', use testscript and txtar files to define the different test cases. The previous test was only testing `gno build` without arguments and files, so this PR adds more cases. Interestingly, the gno files are only used to determine the directories where the 'go build' command will be passed. This means only go file syntax is checked (gno file syntax is ignored, as pictured in `invalid_gno_files.txtar` case). Also a `go.mod` is required or else the command fails. Like the previous test, the new test can be run via ``` $ go test ./gnovm/cmd/gno -v -run Build ``` <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [x] 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 - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
7 tasks
gfanton
pushed a commit
to gfanton/gno
that referenced
this pull request
Nov 9, 2023
Like done for 'gno test', use testscript and txtar files to define the different test cases. The previous test was only testing `gno build` without arguments and files, so this PR adds more cases. Interestingly, the gno files are only used to determine the directories where the 'go build' command will be passed. This means only go file syntax is checked (gno file syntax is ignored, as pictured in `invalid_gno_files.txtar` case). Also a `go.mod` is required or else the command fails. Like the previous test, the new test can be run via ``` $ go test ./gnovm/cmd/gno -v -run Build ``` <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [x] 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 - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
thehowl
pushed a commit
that referenced
this pull request
Nov 16, 2023
Closes: #1242 In favor of `gno precompile -gobuild`. As seen in the tests written for `gno build` in this PR #1103, the command's behavior is kinda unexpected. It actually doesn't care about the syntax of gno files and only relies on go files found in the path passed as an argument. Because of that, I chose to name the flag `-gobuild` instead of `-build` because I found that represents better what's really happening when this flag is provided. As mentioned in the linked issue, `gno build` will be re-implemented in the future with an other behavior. <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [ ] 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](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Like done for 'gno test', use testscript and txtar files to define the different test cases.
The previous test was only testing
gno build
without arguments and files, so this PR adds more cases.Interestingly, the gno files are only used to determine the directories where the 'go build' command will be passed. This means only go file syntax is checked (gno file syntax is ignored, as pictured in
invalid_gno_files.txtar
case). Also ago.mod
is required or else the command fails.Like the previous test, the new test can be run via
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description