Use distinguished exit status for unittests.
* Enabled a parametric exit status in Terminator::Exit().
* The unittest binary sets this exit status to 2, to distinguish it from
other exit(1) calls in the code base.
BUG=chromium-os:29841
TEST=Build, passes unit tests.
Change-Id: I2bf6a834743e513a647ed7bb2266ef095064d6bc
Reviewed-on: https://gerrit.chromium.org/gerrit/21479
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/testrunner.cc b/testrunner.cc
index 725b5b5..59b1b4b 100644
--- a/testrunner.cc
+++ b/testrunner.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// 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.
@@ -21,7 +21,12 @@
g_thread_init(NULL);
dbus_g_thread_init();
base::AtExitManager exit_manager;
- chromeos_update_engine::Terminator::Init();
+ // TODO(garnold) temporarily cause the unittest binary to exit with status
+ // code 2 upon catching a SIGTERM. This will help diagnose why the unittest
+ // binary is perceived as failing by the buildbot. We should revert it to use
+ // the default exit status of 1. Corresponding reverts are necessary in
+ // terminator_unittest.cc.
+ chromeos_update_engine::Terminator::Init(2);
chromeos_update_engine::Subprocess::Init();
CommandLine::Init(argc, argv);
::testing::InitGoogleTest(&argc, argv);