mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-21 18:18:41 +00:00
workloads/openssl: save binary's hash and version
Store the hash and the version of the openssl executable used by the workload in the result metadata.
This commit is contained in:
parent
2ff06af632
commit
ec9605603e
@ -55,7 +55,12 @@ class Openssl(Workload):
|
||||
def initialize(self, context):
|
||||
if self.use_system_binary:
|
||||
try:
|
||||
self.target.execute('openssl -h')
|
||||
cmd = '{0} md5sum < $({0} which openssl)'
|
||||
output = self.target.execute(cmd.format(self.target.busybox))
|
||||
md5hash = output.split()[0]
|
||||
version = self.target.execute('openssl version').strip()
|
||||
context.update_metadata('hashes', 'openssl', md5hash)
|
||||
context.update_metadata('versions', 'openssl', version)
|
||||
except TargetError:
|
||||
msg = 'Openssl does not appear to be installed on target.'
|
||||
raise WorkloadError(msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user