From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH kvm-unit-tests] cscope: fix database generation Date: Tue, 10 May 2016 15:55:02 +0200 Message-ID: <5731E836.5020007@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: Bandan Das , KVM Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:33982 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766AbcEJNzF (ORCPT ); Tue, 10 May 2016 09:55:05 -0400 Received: by mail-wm0-f68.google.com with SMTP id n129so2807071wmn.1 for ; Tue, 10 May 2016 06:55:04 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Yeah, kvm-unit-tests flamewars! Testing has really taken off. Paolo On 19/04/2016 01:04, Bandan Das wrote: > > The cscope.files that we generate doesn't include all > source files that are potentially interesting. We should > include all $(ARCH)es and not the just the one configure > finds. Moreover, $(ARCH) expands to x86_64 which is not the > correct path for x86 sources. Generate cscope.files by searching > for all files starting from root. > > While we are there, remove the unnecessary sed substitution > and modify find to include a few other file name extensions. > > Signed-off-by: Bandan Das > --- > Makefile | 9 +++------ > configure | 2 ++ > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/Makefile b/Makefile > index 5d7506e..458d0f0 100644 > --- a/Makefile > +++ b/Makefile > @@ -92,11 +92,8 @@ distclean: clean libfdt_clean > $(RM) lib/asm config.mak $(TEST_DIR)-run test.log msr.out cscope.* > $(RM) -r tests > > -cscope: cscope_dirs = lib lib/libfdt lib/linux > -cscope: cscope_dirs += lib/$(ARCH)/asm lib/$(TEST_DIR)/asm lib/asm-generic > -cscope: cscope_dirs += $(TEST_DIR) lib/$(TEST_DIR) lib/$(ARCH) > cscope: > - $(RM) ./cscope.* > - find -L $(cscope_dirs) -maxdepth 1 \ > - -name '*.[chsS]' -print | sed 's,^\./,,' | sort -u > ./cscope.files > + $(RM) $(SRCDIR)/cscope.* > + find -L $(SRCDIR) -maxdepth 3 \ > + -regex '.*\.\(c\|h\|cc\|S\|sh\|bash\|s\)$$' -print | sort -u > ./cscope.files > cscope -bk > diff --git a/configure b/configure > index ba6c55b..3153fb9 100755 > --- a/configure > +++ b/configure > @@ -12,6 +12,7 @@ host=$arch > cross_prefix= > endian="" > pretty_print_stacks=yes > +srcdir=`pwd` > > usage() { > cat <<-EOF > @@ -159,4 +160,5 @@ TEST_DIR=$testdir > FIRMWARE=$firmware > ENDIAN=$endian > PRETTY_PRINT_STACKS=$pretty_print_stacks > +SRCDIR=$srcdir > EOF >