-
Notifications
You must be signed in to change notification settings - Fork 88
Added test to build, compile and run secvarctl test. #892
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
base: master
Are you sure you want to change the base?
Conversation
Added test to build, compile, run secvarctl and generate keys/auth files. Signed-off-by: Krishan Gopal Saraswat <krishang@linux.ibm.com>
@@ -0,0 +1,92 @@ | |||
import unittest |
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.
Please have a header added .. you can inspire from other test
if self.distro_name == 'rhel': | ||
self.cv_HOST.host_run_command(f"{self.installer} {pkg} -y") | ||
elif self.distro_name == 'sles': | ||
self.cv_HOST.host_run_command(f"{self.installer} -y {pkg}") |
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.
please move this logic in utils . and we can drive that from test like just passing package name
|
||
self.build_path = os.path.join(self.home, "secvarctl") | ||
self.connection.run_command("cd {} && mkdir -p build && cd build".format(self.build_path)) | ||
self.connection.run_command("cmake ../") |
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.
If make or other build commands fail, we should not jump in the next step .. is except
is able to catch these scenario
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.
@Krishan-Saraswat @PraveenPenguin just curious why this test in op-test and not in avocado misc ?
|
||
|
||
class SecvarctlTest(unittest.TestCase): | ||
def setUp(self): |
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.
some doc string to explain what test does
Added test to build, compile, run secvarctl and generate keys/auth files.
Ran 1 test in 164.866s
OK
Generating XML reports...
Generated XML report: /home/op-test/test-reports/test-run-20250710081144/TEST-testcases.OpTestSecvarctl.SecvarctlTest-20250710081144.xml