Hi Lucas This is a small change, based your code to copy src dir form bindir to tmpdir,and just check self.srcdir for once is ok Not a bug fix:)
Thanks Mike 在 2012-08-03五的 13:33 +0800,Mike Qiu写道: > Currently,the self.srcdir is checked twice in shard.test,maybe a waste > Now just check once is enough > > Signed-off-by: Mike Qiu <[email protected]> > --- > client/shared/test.py | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/client/shared/test.py b/client/shared/test.py > index f23d372..81ea217 100644 > --- a/client/shared/test.py > +++ b/client/shared/test.py > @@ -55,11 +55,11 @@ class base_test(object): > self.srcdir = os.path.join(output_config, > os.path.basename(self.bindir), > 'src') > source_code_dir = os.path.join(self.bindir, 'src') > - if os.path.isdir(source_code_dir): > - if not os.path.isdir(self.srcdir): > - shutil.copytree(source_code_dir, self.srcdir) > if not os.path.isdir(self.srcdir): > - os.makedirs(self.srcdir) > + if os.path.isdir(source_code_dir): > + shutil.copytree(source_code_dir, self.srcdir) > + else: > + os.makedirs(self.srcdir) > patch_file_list = glob.glob(os.path.join(self.bindir, "*.patch")) > for patch_src in patch_file_list: > print patch_src _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
