From 44714c4fa1d66e8979fd0bcab0b3fa30a7d33c58 Mon Sep 17 00:00:00 2001 From: Lucas Meneghel Rodrigues Date: Fri, 11 Jul 2014 12:02:12 -0300 Subject: [PATCH] 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: Lucas Meneghel Rodrigues --- avocado/test.py | 12 ++++++------ tests/doublefree/{deps => data}/doublefree.c | 0 tests/fiotest/{deps => data}/fio-2.1.7.tar.bz2 | Bin tests/fiotest/{deps => data}/fio-mixed.job | 0 tests/gendata/gendata.py | 8 ++++---- tests/linuxbuild/{deps => data}/config | 0 tests/synctest/{deps => data}/synctest.tar.bz2 | Bin tests/trinity/{deps => data}/trinity-1.4.tar.bz2 | Bin 8 files changed, 10 insertions(+), 10 deletions(-) rename tests/doublefree/{deps => data}/doublefree.c (100%) rename tests/fiotest/{deps => data}/fio-2.1.7.tar.bz2 (100%) rename tests/fiotest/{deps => data}/fio-mixed.job (100%) rename tests/linuxbuild/{deps => data}/config (100%) rename tests/synctest/{deps => data}/synctest.tar.bz2 (100%) rename tests/trinity/{deps => data}/trinity-1.4.tar.bz2 (100%) diff --git a/avocado/test.py b/avocado/test.py index d8d238d3..1a7a9156 100644 --- a/avocado/test.py +++ b/avocado/test.py @@ -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): """ diff --git a/tests/doublefree/deps/doublefree.c b/tests/doublefree/data/doublefree.c similarity index 100% rename from tests/doublefree/deps/doublefree.c rename to tests/doublefree/data/doublefree.c diff --git a/tests/fiotest/deps/fio-2.1.7.tar.bz2 b/tests/fiotest/data/fio-2.1.7.tar.bz2 similarity index 100% rename from tests/fiotest/deps/fio-2.1.7.tar.bz2 rename to tests/fiotest/data/fio-2.1.7.tar.bz2 diff --git a/tests/fiotest/deps/fio-mixed.job b/tests/fiotest/data/fio-mixed.job similarity index 100% rename from tests/fiotest/deps/fio-mixed.job rename to tests/fiotest/data/fio-mixed.job diff --git a/tests/gendata/gendata.py b/tests/gendata/gendata.py index e0dc0d58..6828741c 100644 --- a/tests/gendata/gendata.py +++ b/tests/gendata/gendata.py @@ -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): diff --git a/tests/linuxbuild/deps/config b/tests/linuxbuild/data/config similarity index 100% rename from tests/linuxbuild/deps/config rename to tests/linuxbuild/data/config diff --git a/tests/synctest/deps/synctest.tar.bz2 b/tests/synctest/data/synctest.tar.bz2 similarity index 100% rename from tests/synctest/deps/synctest.tar.bz2 rename to tests/synctest/data/synctest.tar.bz2 diff --git a/tests/trinity/deps/trinity-1.4.tar.bz2 b/tests/trinity/data/trinity-1.4.tar.bz2 similarity index 100% rename from tests/trinity/deps/trinity-1.4.tar.bz2 rename to tests/trinity/data/trinity-1.4.tar.bz2 -- GitLab