mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-21 14:47:18 +00:00
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 <matthew.johnson@intel.com>
This commit is contained in:
+1
-4
@@ -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):
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
+1
-4
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user