From 2929158dc3903b5acf961bc789235b83193331f0 Mon Sep 17 00:00:00 2001 From: Ionela Voinescu Date: Mon, 30 Jan 2017 15:40:19 +0000 Subject: [PATCH] utils/energy.py: call superclass init with res_dir For the ACME energy probe the init funtion call of the superclass did not specify the results directory so the sample file would go by default to /tmp/, where it might be overwritten if two tests are ran at the same time, where the channels used have the same channel descriptors. For safety, pass the res_dir to the init call and have the output file stored there before being moved to the specified output folder. Signed-off-by: Ionela Voinescu --- libs/utils/energy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/utils/energy.py b/libs/utils/energy.py index a561d826e..57fbde74f 100644 --- a/libs/utils/energy.py +++ b/libs/utils/energy.py @@ -313,7 +313,7 @@ class ACME(EnergyMeter): """ def __init__(self, target, conf, res_dir): - super(ACME, self).__init__(target) + super(ACME, self).__init__(target, res_dir) # Assume iio-capture is available in PATH iioc = conf.get('conf', { -- GitLab