Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: crash_sender

Issue 3893005: crash-reporter: Fix race between test code and rsyslogd (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git
Patch Set: comment fix Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_sender
diff --git a/crash_sender b/crash_sender
index 684986468518d0301d51af08571d6c910ac5ef0a..9d34e34b018abe7657393266b2eef2ea030b5e7d 100644
--- a/crash_sender
+++ b/crash_sender
@@ -68,6 +68,12 @@ lecho() {
logger -t "${TAG}" "$@"
}
+# Returns true if mock is enabled.
+is_mock() {
+ [ -f "${MOCK_CRASH_SENDING}" ] && return 0
+ return 1
+}
+
cleanup() {
if [ -n "${TMP_DIR}" ]; then
rm -rf "${TMP_DIR}"
@@ -75,6 +81,11 @@ cleanup() {
if [ ${CLEAN_UP_RUN_FILE} -eq 1 ]; then
rm -f "${RUN_FILE}"
fi
+ if is_mock; then
+ # For testing purposes, emit a message to log so that we
+ # know when the test has received all the messages from this run.
+ lecho "crash_sender done."
+ fi
}
check_not_already_running() {
@@ -165,12 +176,6 @@ get_key_value() {
grep "$2=" "$1" | cut -d = -f 2-
}
-# Returns true if mock is enabled.
-is_mock() {
- [ -f "${MOCK_CRASH_SENDING}" ] && return 0
- return 1
-}
-
# Return the board name.
get_board() {
echo $(get_key_value "/etc/lsb-release" "CHROMEOS_RELEASE_BOARD")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698