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/run_unittests b/run_unittests
new file mode 100755
index 0000000..a61e90c
--- /dev/null
+++ b/run_unittests
@@ -0,0 +1,16 @@
+#!/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.
+
+# Runs the update engine unit tests, including both userland and run-as-root
+# tests.
+
+if [ ! -e ./update_engine_unittests ]; then
+ echo 'Error: unit test binary missing' >&2
+ exit 1
+fi
+
+./update_engine_unittests --gtest_filter='-*.RunAsRoot*'
+sudo ./update_engine_unittests --gtest_filter='*.RunAsRoot*'