job.run_test() may take a url parameter, that usually is the test name, however it can take an actual url with a .tar.bz2 test. However, if we're not going to use this feature, this directory is not needed, and if needed, the directory will be created by the install from url code.
Therefore, remove this to better comply with packaging requirements (people might feel uneasy about autotest creating directories on python site-packages dir in a compulsory way). Update the job unittest accordingly. Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- client/job.py | 4 ---- client/job_unittest.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/client/job.py b/client/job.py index c5e362b..9190c38 100644 --- a/client/job.py +++ b/client/job.py @@ -225,10 +225,6 @@ class base_client_job(base_job.base_job): self._load_sysinfo_state() if not options.cont: - download = os.path.join(self.testdir, 'download') - if not os.path.exists(download): - os.mkdir(download) - shutil.copyfile(self.control, os.path.join(self.resultdir, 'control')) diff --git a/client/job_unittest.py b/client/job_unittest.py index 1ff3266..9be71b4 100755 --- a/client/job_unittest.py +++ b/client/job_unittest.py @@ -201,14 +201,11 @@ class test_base_job(unittest.TestCase): # other setup results = os.path.join(self.autodir, 'results') - download = os.path.join(self.autodir, 'tests', 'download') pkgdir = os.path.join(self.autodir, 'packages') utils.drop_caches.expect_call() job_sysinfo = sysinfo.sysinfo.expect_new(resultdir) if not cont: - os.path.exists.expect_call(download).and_return(False) - os.mkdir.expect_call(download) shutil.copyfile.expect_call(mock.is_string_comparator(), os.path.join(resultdir, 'control')) -- 1.7.10 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
