summaryrefslogtreecommitdiffstats
path: root/baro_tests
diff options
context:
space:
mode:
authorSharada Shiddibhavi <sharada.shiddibhavi@intel.com>2017-09-29 03:31:16 +0000
committerSharada Shiddibhavi <sharada.shiddibhavi@intel.com>2017-09-29 03:34:34 +0000
commit0c9398c650e78977f7e6bec460f578e17bc58c31 (patch)
tree6d1a083ae233380f7278ed513168672db6a60e13 /baro_tests
parent21785d87913475a45bd9251c8d0e605eeeb4f578 (diff)
Changing directory in CSV testcases for Barometer
This patch contains modifications to the path for CSV directories Change-Id: Ia74a6aba47fc51d0d8783df34eebcfc94e3f011d Signed-off-by: Sharada Shiddibhavi <sharada.shiddibhavi@intel.com>
Diffstat (limited to 'baro_tests')
-rw-r--r--baro_tests/collectd.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/baro_tests/collectd.py b/baro_tests/collectd.py
index 1b5a9232..3cd55bf1 100644
--- a/baro_tests/collectd.py
+++ b/baro_tests/collectd.py
@@ -210,21 +210,27 @@ class CSVClient(object):
meter_category, date))
stdout2 = node.run_cmd(
"tail -1 /var/lib/collectd/csv/"
- + "{0}.jf.intel.com/{1}/{2}-{3}".format(
- compute_node.get_name(), plugin_subdir,
+ + "{0}/{1}/{2}-{3}".format(
+ hostname, plugin_subdir,
meter_category, date))
# Storing last two values
values = stdout1
+ values2 = stdout2
if values is None:
logger.error(
'Getting last two CSV entries of meter category'
+ ' {0} in {1} subdir failed'.format(
meter_category, plugin_subdir))
+ elif values2 is None:
+ logger.error(
+ 'Getting last CSV entries of meter category'
+ + ' {0} in {1} subdir failed'.format(
+ meter_category, plugin_subdir))
else:
values = values.split(',')
old_value = float(values[0])
- stdout2 = stdout2.split(',')
- new_value = float(stdout2[0])
+ values2 = values2.split(',')
+ new_value = float(values2[0])
metrics.append((
plugin_subdir, meter_category, old_value,
new_value))