-
Notifications
You must be signed in to change notification settings - Fork 142
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
Assorted changes. Test fixture, $dumpfile elimination, tests, apio sim --force. #482
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
with a context manager that provides the user with an (new) ApioSandbox object, that contains the sandbox info and utility methods. The sanbox uses auto deleted temp directory and auto restored system env.
as soon as the sandbox is created (used to be set only when invoking commands). This simplifies the creation of test ApioContext in the tests.
install command so it can be deleted with it.
of sys.exit() and click context exit(). Motivation is testing code simplicity. Failure assertions can now trap and handle only the standard system exit exception.
…on unicode text but is called from only one place with syntetic text that we construt. If the text we construct is invalid, we should fix the constrution. I was not able to introduce the case of invalid unicode.
structure of apio. No code change.
the cleaned up examples will be commited in the official one. This does not affect prod apio.
…ocess and warn if it contains '$dumpfile'. Using $dumpfile is an anti pattern because it's may overide the name and location of the .vcd output file that is set by apio. The new code just warns and functionality stayed the same, at least for now, for backward compatibility.
…quest from Carlos. The time penalty is neglibable.
even if source files where not change.
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.
Assorted changes. Details are in the individual commits.
Highlights in arbitrary order:
The apio test runner now provides a 'sandbox' context manager with a sandbox object that provides operations such as reading/writing files or invoking apio commands. The sandbox cleans up temp directories and system env mutations. The motivation is test simplicity.
Added tests.
apio now set up the default testbench .vcd file name and location which eliminate the need to use $dumpfile and VCD_OUT. It's still backward compatible with old testbences but prints a warning regarding the use of $dumpfile.
apio sim has a new flag --force that forces re-simulation (per Carlos' request)