avocado: Rename test.datadir to test.outputdir and test.depsdir to test.datadir

In fact those names are more clear as to the purpose
of each directory.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 d9b729d2
......@@ -116,7 +116,7 @@ class Test(unittest.TestCase):
self.tag = tag or s_tag
self.job = job
self.basedir = os.path.join(data_dir.get_test_dir(), self.name)
self.depsdir = os.path.join(self.basedir, 'deps')
self.datadir = os.path.join(self.basedir, 'data')
self.workdir = os.path.join(data_dir.get_tmp_dir(), self.name)
if not os.path.isdir(self.workdir):
os.makedirs(self.workdir)
......@@ -130,9 +130,9 @@ class Test(unittest.TestCase):
if not os.path.isdir(self.logdir):
os.makedirs(self.logdir)
self.logfile = os.path.join(self.logdir, 'debug.log')
self.datadir = os.path.join(self.logdir, 'data')
if not os.path.isdir(self.datadir):
os.makedirs(self.datadir)
self.outputdir = os.path.join(self.logdir, 'data')
if not os.path.isdir(self.outputdir):
os.makedirs(self.outputdir)
self.sysinfodir = os.path.join(self.logdir, 'sysinfo')
self.sysinfo_logger = sysinfo.SysInfo(basedir=self.sysinfodir)
......@@ -174,7 +174,7 @@ class Test(unittest.TestCase):
self.traceback = None
self.text_output = None
whiteboard_path = os.path.join(self.datadir, 'whiteboard')
whiteboard_path = os.path.join(self.outputdir, 'whiteboard')
self.whiteboard = whiteboard.WhiteBoard(self, whiteboard_path)
self.time_elapsed = None
......@@ -220,7 +220,7 @@ class Test(unittest.TestCase):
:return: Path where dependency is supposed to be found.
"""
return os.path.join(self.depsdir, basename)
return os.path.join(self.datadir, basename)
def start_logging(self):
"""
......
......@@ -34,7 +34,7 @@ class gendata(test.Test):
return
text = ["DREADED BLUE SCREEN OF DEATH"]
dmesg_path = os.path.join(self.job.debugdir, "sysinfo", "pre", "dmesg_-c")
dmesg_path = os.path.join(self.job.logdir, "sysinfo", "pre", "dmesg_-c")
self.log.info("dmesg_path: %s", dmesg_path)
if os.path.exists(dmesg_path):
dmesg = open(dmesg_path)
......@@ -46,13 +46,13 @@ class gendata(test.Test):
for line in text:
draw.text((2, y), line)
y += 12
bsod.save(os.path.join(self.datadir, "bsod.png"))
bsod.save(os.path.join(self.outputdir, "bsod.png"))
def generate_json(self):
import json
output_path = os.path.join(self.datadir, "test.json")
output_path = os.path.join(self.outputdir, "test.json")
output = {"basedir": self.basedir,
"datadir": self.datadir}
"outputdir": self.outputdir}
json.dump(output, open(output_path, "w"))
def action(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册