From 2239da4c69eb6ac578036530c6c86c927ae3355b Mon Sep 17 00:00:00 2001 From: Lucas Meneghel Rodrigues Date: Fri, 10 Apr 2015 11:04:00 -0300 Subject: [PATCH] selftests/functional/journal_tests.py: Use --job-results-dir Signed-off-by: Lucas Meneghel Rodrigues --- selftests/all/functional/avocado/journal_tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/selftests/all/functional/avocado/journal_tests.py b/selftests/all/functional/avocado/journal_tests.py index 00ee5549..7b417a56 100644 --- a/selftests/all/functional/avocado/journal_tests.py +++ b/selftests/all/functional/avocado/journal_tests.py @@ -3,6 +3,8 @@ import os import sys import json import sqlite3 +import tempfile +import shutil # simple magic for using scripts within a source tree basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..') @@ -17,7 +19,9 @@ class JournalPluginTests(unittest.TestCase): def setUp(self): os.chdir(basedir) - self.cmd_line = './scripts/avocado run --sysinfo=off --json - --journal examples/tests/passtest.py' + self.tmpdir = tempfile.mkdtemp() + self.cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off --json - ' + '--journal examples/tests/passtest.py' % self.tmpdir) self.result = process.run(self.cmd_line, ignore_status=True) data = json.loads(self.result.stdout) self.job_id = data['job_id'] @@ -45,6 +49,7 @@ class JournalPluginTests(unittest.TestCase): def tearDown(self): self.db.close() + shutil.rmtree(self.tmpdir) if __name__ == '__main__': -- GitLab