Files
OpenCellular/chip/host/reboot.c
Vic Yang f2046ce3dc Flush test coverage information before rebooting emulator
If we reboots the emulator without flushing test coverage information,
the test coverage report will be incorrect. Let's fix this by flushing
it before every reboot.

BUG=chrome-os-partner:19235
TEST=Generate test coverage report and check correctness.
BRANCH=None

Change-Id: I1eb060e419b767f382325bed841366c491ba56b7
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/167770
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2013-09-04 20:32:45 +00:00

21 lines
457 B
C

/* Copyright (c) 2013 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.
*/
/* Emulator self-reboot procedure */
#include <string.h>
#include <unistd.h>
#include "host_test.h"
#include "reboot.h"
#include "test_util.h"
void emulator_reboot(void)
{
char *argv[] = {strdup(__get_prog_name()), NULL};
emulator_flush();
execv(__get_prog_name(), argv);
}