From d4e78abc6ce5b32aa32c4cf587d82ea43f0048fb Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Mon, 23 Oct 2017 14:17:28 -0700 Subject: [PATCH] Remove unused "output" directory Since moving output to a temporary directory, the "output" directory has fallen out of use. Remove the output directory from autospec. Signed-off-by: Matthew Johnson --- autospec/build.py | 5 +---- autospec/tarball.py | 2 +- tests/test_build.py | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/autospec/build.py b/autospec/build.py index 1a1cc88..23618e6 100644 --- a/autospec/build.py +++ b/autospec/build.py @@ -33,18 +33,15 @@ success = 0 round = 0 must_restart = 0 base_path = None -output_path = None download_path = None uniqueext = '' def setup_workingdir(workingdir): global base_path - global output_path global download_path base_path = workingdir - output_path = os.path.join(base_path, "output") - download_path = os.path.join(output_path, tarball.name) + download_path = os.path.join(base_path, tarball.name) def simple_pattern_pkgconfig(line, pattern, pkgconfig): diff --git a/autospec/tarball.py b/autospec/tarball.py index a8337fc..64712a2 100644 --- a/autospec/tarball.py +++ b/autospec/tarball.py @@ -454,7 +454,7 @@ def prepare_and_extract(extract_cmd): """ shutil.rmtree(os.path.join(build.base_path, name), ignore_errors=True) shutil.rmtree(os.path.join(build.base_path, tarball_prefix), ignore_errors=True) - os.makedirs("{}".format(build.output_path), exist_ok=True) + os.makedirs("{}".format(build.base_path), exist_ok=True) call("mkdir -p %s" % build.download_path) call(extract_cmd) diff --git a/tests/test_build.py b/tests/test_build.py index 77624c6..1e3c4d9 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -23,7 +23,6 @@ class TestBuildpattern(unittest.TestCase): build.round = 0 build.must_restart = 0 build.base_path = None - build.output_path = None build.download_path = None build.buildreq.buildreqs = set() build.config.config_opts['32bit'] = False @@ -35,9 +34,7 @@ class TestBuildpattern(unittest.TestCase): build.tarball.name = "testtarball" build.setup_workingdir("test_directory") self.assertEqual(build.base_path, "test_directory") - self.assertEqual(build.output_path, "test_directory/output") - self.assertEqual(build.download_path, - "test_directory/output/testtarball") + self.assertEqual(build.download_path, "test_directory/testtarball") def test_simple_pattern_pkgconfig(self): """