Cleanup package dependencies, incremental build and unit testing scripts
* Removed stale dependency / use of fakeroot unit test invocation.
* Separated incremental build and unit test invocation from
gen_coverage_html.sh into their own scripts.
* Added checks for required binaries in gen_coverage_html.sh.
* Renamed setup_dev_packages to have a .sh suffix, for uniformity. Also
requires that it installs packages regardless of whether or not
they're already installed; this is to prevent a situation where
packages were removed from the portage tree but happen to still live
in the local chroot, so the discrepancy goes unnoticed (for example,
sys-apps/fakeroot and dev-util/lcov).
* Cosmetics: switched to long options when applicable, for clarity.
BUG=None
TEST=Update engine builds, tests, and coverage generation correctly
invoked
CQ-DEPEND=I949f6b4abad52d04245e5982ac95884d1d0a05fc
Change-Id: I439e74eb9772f8f368256a0adf13503e3257e66c
Reviewed-on: https://gerrit.chromium.org/gerrit/23229
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
diff --git a/build b/build
new file mode 100755
index 0000000..b4dbb20
--- /dev/null
+++ b/build
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Invokes an incremental, parallel build of the update engine binaries. For the
+# number of build threads, it uses the number of processing cores plus one.
+
+NUM_CORES=$(cat /proc/cpuinfo | grep '^processor' | wc -l)
+scons -j $((NUM_CORES + 1)) "$@"