Files
OpenCellular/cts/common/dut_common.c
Chris Chen 7bd4984b01 cts: Added parsing for cts suites
Added test recording when calling reset from command
line. These results are printed on the screen and
saved in /tmp/results/<board>/<module>.txt

BRANCH=None
BUG=None
TEST=Manual
- Connect, build and flash boards
- Navigate to ec/cts
- ./cts.py --run
- Find test results /tmp/results/<board>/<module>.txt
- Tests names should be left aligned in one column
  and their results right aligned in a 2nd column

Change-Id: I3429d6092f2bd5d5f6825245f5439ace3f47f1fa
Reviewed-on: https://chromium-review.googlesource.com/360653
Commit-Ready: Chris Chen <twothreecc@google.com>
Tested-by: Chris Chen <twothreecc@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2016-07-26 19:42:33 -07:00

33 lines
798 B
C

/* Copyright 2016 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.
*/
#include "gpio.h"
#include "timer.h"
#include "watchdog.h"
#include "cts_common.h"
#include "dut_common.h"
/* Returns unknown because TH could potentially still get stuck
* even if the DUT completes the sync
*/
enum cts_rc sync(void)
{
int input_level;
gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 0);
do {
watchdog_reload();
input_level = gpio_get_level(GPIO_HANDSHAKE_INPUT);
} while (!input_level);
gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 1);
do {
watchdog_reload();
input_level = gpio_get_level(GPIO_HANDSHAKE_INPUT);
} while (input_level);
gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 0);
return CTS_RC_SUCCESS;
}