From 5656475bcc991a64a6ca130fda0653f55e834563 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Thu, 22 Sep 2011 21:07:05 +0000 Subject: Speed up check_licenses by another 30% by scanning less files. This improves run time from ~3 minutes to ~2 minutes for me locally. BUG=28291 Review URL: http://codereview.chromium.org/7974012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102363 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/devscripts/chromium-1.patch | 13 +++++++++++++ third_party/devscripts/licensecheck.pl | 6 ++++++ 2 files changed, 19 insertions(+) (limited to 'third_party') diff --git a/third_party/devscripts/chromium-1.patch b/third_party/devscripts/chromium-1.patch index 3dd9264..ed40b4d 100644 --- a/third_party/devscripts/chromium-1.patch +++ b/third_party/devscripts/chromium-1.patch @@ -1,5 +1,18 @@ --- licensecheck.pl.orig 2011-09-22 10:51:25.934402455 -0700 +++ licensecheck.pl 2011-09-22 10:45:54.585545044 -0700 +@@ -241,6 +241,12 @@ my @files = (); + my @find_args = (); + my $files_count = @ARGV; + ++push @find_args, qw(-not ( -path */LayoutTests/* -prune ) ); ++push @find_args, qw(-not ( -path */out/Debug/* -prune ) ); ++push @find_args, qw(-not ( -path */out/Release/* -prune ) ); ++push @find_args, qw(-not ( -path *.git* -prune ) ); ++push @find_args, qw(-not ( -path *.svn* -prune ) ); ++ + push @find_args, qw(-maxdepth 1) unless $opt_recursive; + push @find_args, qw(-follow -type f -print); + @@ -277,10 +277,6 @@ while () { last if ($. > $opt_lines); diff --git a/third_party/devscripts/licensecheck.pl b/third_party/devscripts/licensecheck.pl index f6cb47d..abdb1a4 100755 --- a/third_party/devscripts/licensecheck.pl +++ b/third_party/devscripts/licensecheck.pl @@ -241,6 +241,12 @@ my @files = (); my @find_args = (); my $files_count = @ARGV; +push @find_args, qw(-not ( -path */LayoutTests/* -prune ) ); +push @find_args, qw(-not ( -path */out/Debug/* -prune ) ); +push @find_args, qw(-not ( -path */out/Release/* -prune ) ); +push @find_args, qw(-not ( -path *.git* -prune ) ); +push @find_args, qw(-not ( -path *.svn* -prune ) ); + push @find_args, qw(-maxdepth 1) unless $opt_recursive; push @find_args, qw(-follow -type f -print); -- cgit v1.1