On 06/13/2012 10:26 PM, Amos Kong wrote: > On 14/06/12 08:39, Lucas Meneghel Rodrigues wrote: >> On Wed, Jun 13, 2012 at 5:34 PM, Chris Evich<cev...@redhat.com> wrote: >>> make_clean checks for the word 'example' in the src directory path >> >> Ok, good catch, I was wondering why I was getting the patch files from >> the performance test erased every time... applied to master and >> rebased next accordingly... >> >>> Signed-off-by: Chris Evich<cev...@redhat.com> >>> --- >>> client/tools/make_clean | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/client/tools/make_clean b/client/tools/make_clean >>> index a74699e..146fa1b 100755 >>> --- a/client/tools/make_clean >>> +++ b/client/tools/make_clean >>> @@ -18,7 +18,7 @@ def purge_src(top_dir): >>> continue >>> ret = os.system('grep -q "preserve_srcdir = " ' + py) >>> src_path = os.path.abspath(os.path.join('tests', dir, 'src')) >>> - if not os.path.exists(src_path): >>> + if not os.path.exists(src_path) or not src_path.count('example'): > > The directory name is 'examples', not 'example'. It's not good to add > this filter here. > Talked with lmr in IRC, I would revert this patch and move those > 'examples' to other directory. > >
Actually count() should match against both since 'example' is a substring of 'examples'. It would probably be better to use case-insensitive regex matching here, or find another way to not delete repo. files. This was just a quickie I tossed together, but if you'd like to improve on it, please feel free :) >>> continue >>> if ret: # This should have a replaceable src dir >>> cmd = 'rm -rf ' + src_path >>> -- >>> 1.7.1 >>> >>> _______________________________________________ >>> Autotest mailing list >>> Autotest@test.kernel.org >>> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest >> >> >> > -- Chris Evich, RHCA, RHCE, RHCDS, RHCSS Quality Assurance Engineer e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest