[OE-core] [PATCH] runtime: Add cleanup for logrotate tests

jose.perez.carranza at linux.intel.com jose.perez.carranza at linux.intel.com
Fri Jan 6 20:45:28 UTC 2017


From: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>

Delete logrotate dir to avoid errors
when test are executed more than 1
time on the same target.

Signed-off-by: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>
---
 meta/lib/oeqa/runtime/logrotate.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/runtime/logrotate.py b/meta/lib/oeqa/runtime/logrotate.py
index cf88c54..063280b 100644
--- a/meta/lib/oeqa/runtime/logrotate.py
+++ b/meta/lib/oeqa/runtime/logrotate.py
@@ -27,3 +27,4 @@ class LogrotateTest(oeRuntimeTest):
         self.assertEqual(status, 0, msg = "logrotate service could not be reloaded. Status and output: %s and %s" % (status, output))
         output = self.target.run('ls -la $HOME/logrotate_dir/ | wc -l')[1]
         self.assertTrue(int(output)>=3, msg = "new logfile could not be created. List of files within log directory: %s" %(self.target.run('ls -la $HOME/logrotate_dir')[1]))
+        self.target.run('rm -rf $HOME/logrotate_dir')
-- 
2.1.4




More information about the Openembedded-core mailing list