-
Notifications
You must be signed in to change notification settings - Fork 97
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
Use a TPM simulator for the integration tests #107
Conversation
This has been changed upstream in tpm2-software/tpm2-tools@11e5c70 Signed-off-by: Jonas Witschel <diabonas@gmx.de>
The environment variable is useful for configuring the integration tests to use a TPM simulator. Signed-off-by: Jonas Witschel <diabonas@gmx.de>
e539976
to
1c09c4c
Compare
Codecov Report
@@ Coverage Diff @@
## master #107 +/- ##
==========================================
+ Coverage 62.73% 67.43% +4.69%
==========================================
Files 9 9
Lines 1170 1176 +6
==========================================
+ Hits 734 793 +59
+ Misses 436 383 -53
Continue to review full report at Codecov.
|
c9afa65
to
71d92f1
Compare
Currently the integration tests use the first TPM they find on the system. This commit starts a TPM simulator for every integration test and configures the TCTI environment variable to use it, allowing parallel execution of the tests. Signed-off-by: Jonas Witschel <diabonas@gmx.de>
Setting the environment variables and clearing the TPM is now done in the wrapper. Furthermore as we run in a temporary directory anyway, there is no need for ${DIR} any more. Signed-off-by: Jonas Witschel <diabonas@gmx.de>
Avoids a port conflict when running the tests in parallel. Signed-off-by: Jonas Witschel <diabonas@gmx.de>
This is possible after the preceeding changes to the integration test harness. Signed-off-by: Jonas Witschel <diabonas@gmx.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks a lot
Add a simple test harness to automatically start and use a TPM simulator for the integration tests. This is possible by using the TCTI environment variable introduced in #62, which is now enabled by default for this reason.
This has the following advantages:
Additionally this PR fixes #106 (upstream renaming of tpm2-tools options).
Closes #86