flatcar-scripts/sdk_lib
Matt Tennant 298f61ab25 build_packages: Upload command stats after each run.
This changelist adds code in common.sh to support collecting command
statistics before calling upload_command_stats to upload those stats
to an appspot instance.

The presence of a file at ~/.disable_build_stats_upload will disable
all uploading of build command stats.

BUG=chromium-os:27355
TEST=`build_packages --board=x86-generic` with missing appspot instance
  shows upload error but still goes through with build.
TEST=`build_packages --board=x86-generic` with real appspot instance
  completes upload with all expected stats and does not affect build.
TEST=From outside chroot:
`touch ~/.disable_build_stats_upload`
`cros_sdk`
'build_packages --board=x86-generic`
Nothing uploaded due to .disable file
TEST=Verified that putting 'set -u' in my fake build_packages
caused an exit in print_time_elapsed, then fixed unbound variable
in print_time_elapsed, then rerun passed.
TEST=`cbuildbot -g <cl> --lkgm mario-paladin` passed
TEST=`cbuildbot -g <cl> --lkgm link-release` passed

Change-Id: Ieb714522cb32d7558b661e4ee1a197d1fce2c516
Reviewed-on: https://gerrit.chromium.org/gerrit/26084
Tested-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
2012-06-26 13:58:51 -07:00
..
enter_chroot.sh build_packages: Upload command stats after each run. 2012-06-26 13:58:51 -07:00
make_chroot.sh Add hook for personalizing chroot. 2012-06-14 11:24:37 -07:00
make_conf_util.sh Don't look in chroot-based paths outside the chroot, even in jest. 2012-06-07 12:07:41 -07:00