From c813f5bb08d815f3f8495bdb4962c9228235b0f8 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Sat, 5 Jun 2010 01:04:39 +0000 Subject: Added debugging output to mcov to help debug buildbot errors. Die with non-zero return code if it can't operate properly. Review URL: http://codereview.chromium.org/2630002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48991 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/lcov/bin/mcov | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'third_party/lcov') diff --git a/third_party/lcov/bin/mcov b/third_party/lcov/bin/mcov index 8bbb2cc..e6d3446 100755 --- a/third_party/lcov/bin/mcov +++ b/third_party/lcov/bin/mcov @@ -48,6 +48,20 @@ $directory = Cwd::abs_path($directory); # convert the output file path to absolute path. $output_filename = Cwd::abs_path($output_filename); +# Output expected args for buildbot debugging assistance. +my $cwd = getcwd(); +print "mcov: after abs_pathing\n"; +print "mcov: getcwd() = $cwd\n"; +print "mcov: directory for data files is $directory\n"; +print "mcov: output filename is $output_filename\n"; + +# Sanity check; die if path is wrong. +# We don't check for output_filename because... we create it. +if (! -d $directory) { + print "mcov: Bad args passed; exiting with error.\n"; + exit(1); +} + # open file for output open(INFO_HANDLE, ">$output_filename"); -- cgit v1.1