Skip to content

Commit

Permalink
script/autobuild.py: rename sdir to test_source_dir
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Guo <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
catalyst-joe-guo authored and abartlet committed May 10, 2019
1 parent 21475e9 commit af0e0c5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions script/autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,20 +583,20 @@ def __init__(self, name, sequence, cp=True):
self.stdout = open(self.stdout_path, 'w')
self.stderr = open(self.stderr_path, 'w')
self.stdin = open("/dev/null", 'r')
self.sdir = "%s/%s" % (testbase, self.tag)
self.test_source_dir = "%s/%s" % (testbase, self.tag)
self.prefix = "%s/%s" % (test_prefix, self.tag)
run_cmd("rm -rf %s" % self.sdir)
run_cmd("rm -rf %s" % self.test_source_dir)
run_cmd("rm -rf %s" % self.prefix)
if cp:
run_cmd("cp --recursive --link --archive %s %s" % (test_master, self.sdir), dir=test_master, show=True)
run_cmd("cp --recursive --link --archive %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
else:
run_cmd("git clone --recursive --shared %s %s" % (test_master, self.sdir), dir=test_master, show=True)
run_cmd("git clone --recursive --shared %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
self.start_next()

def start_next(self):
if self.next == len(self.sequence):
if not options.nocleanup:
run_cmd("rm -rf %s" % self.sdir)
run_cmd("rm -rf %s" % self.test_source_dir)
run_cmd("rm -rf %s" % self.prefix)
do_print('%s: Completed OK' % self.name)
self.done = True
Expand All @@ -609,7 +609,7 @@ def start_next(self):
# if self.output_mime_type == "text/x-subunit":
# self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit"))
cwd = os.getcwd()
os.chdir("%s/%s" % (self.sdir, self.dir))
os.chdir("%s/%s" % (self.test_source_dir, self.dir))
do_print('%s: [%s] Running %s in %r' % (self.name, self.stage, self.cmd, os.getcwd()))
self.proc = Popen(self.cmd, shell=True,
close_fds=True,
Expand Down Expand Up @@ -675,7 +675,7 @@ def kill_kids(self):
self.retry = None
for b in self.tlist:
if b.proc is not None:
run_cmd("killbysubdir %s > /dev/null 2>&1" % b.sdir, checkfail=False)
run_cmd("killbysubdir %s > /dev/null 2>&1" % b.test_source_dir, checkfail=False)
b.proc.terminate()
b.proc.wait()
b.proc = None
Expand Down

0 comments on commit af0e0c5

Please sign in to comment.