Skip to content
Snippets Groups Projects
Commit 43011065 authored by BRONES Romain's avatar BRONES Romain
Browse files

[AppChecker] Fixes after first test

parent 641ebcce
No related branches found
No related tags found
No related merge requests found
......@@ -138,21 +138,22 @@ class AppChecker:
# Check write attributes
wattr = context[devicepath]["wattributes"]
failattr = dict()
for attr in wattr.keys():
value = prox[attr].value
if value != wattr[attr]
rattr = prox.read_attributes(list(wattr.keys()))
for attr in rattr:
value = attr.value
if value != wattr[attr.name]:
self.logger.warning("Attribute %s/%s value mismatch. Read %s, expect %s."%(
devicepath,
attr,
attr.name,
value,
wattr[attr])
wattr[attr.name]))
status=False
failattr[attr]=value
failattr[attr.name]=value
else:
self.logger.info("Attribute %s/%s is correctly set to value %s."%(
devicepath,
attr,
value)
attr.name,
value))
# -----------------------------------------------------
# Check properties
......@@ -167,20 +168,20 @@ class AppChecker:
k,
devicepath,
value,
props[k])
props[k]))
status=False
failprop[k]=value
else:
self.logger.info("Property %s of device %s is correctly set to %s"%(
k,
devicepath,
value)
value))
# -----------------------------------------------------
# Append to faild context if any fail
if len(failattr.keys()) + len(failprop.keys())>0:
failcontext[devicepath]= {
"properties":failprops,
"properties":failprop,
"wattributes":failattr,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment