]> code.ossystems Code Review - openembedded-core.git/commitdiff
runtime: Add cleanup for logrotate tests
authorJose Perez Carranza <jose.perez.carranza@linux.intel.com>
Fri, 6 Jan 2017 20:45:28 +0000 (14:45 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Jan 2017 18:01:52 +0000 (18:01 +0000)
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@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/runtime/logrotate.py

index cf88c54dfa45578029ab3f31400cc65b554d3f5a..063280b5f73a50747d233a19dd77f5daf8832f6b 100644 (file)
@@ -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')