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

Assorted changes. Test fixture, $dumpfile elimination, tests, apio sim --force. #482

Merged
merged 18 commits into from
Dec 2, 2024

Conversation

zapta
Copy link
Collaborator

@zapta zapta commented Dec 2, 2024

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)

zapta added 18 commits November 29, 2024 00:17
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.
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.
@Obijuan Obijuan merged commit e5d834b into FPGAwars:develop Dec 2, 2024
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