mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
This patch makes each test print start marker before sync. This will allow us to distinguish the failure before even sync is attempted (CTS_RC_DID_NOT_START, thus probably caused by the previous test) and the failure caused by the hanging partner, in which case the one good and alive will be stuck in sync (and should return _DID_NOT_END or even better _BAD_SYNC once we implement timeout in sync). This patch also: * Adds did_not_start_test to and removes debug_test from meta suite * Consolidates test runner loops into common cts_main_loop * Removes dut_common.h and th_common.h * Removes debug print macro and CTS_DEBUG * Replaces all infinite loops after tests with task_wait_event(-1) * Removes meaningless comments and debug printfs * Removes CTS_TEST_ID_* * Adds sync() to task suite BUG=chromium:736104 BRANCH=none TEST=Run run_ects.sh and verify all tests pass Change-Id: I6ccdf26afac6b8e8cb16483c5d75e4e77e7962f4 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/545176
31 lines
874 B
C
31 lines
874 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 "util.h"
|
|
|
|
/*
|
|
* CTS_TEST macro takes the following arguments:
|
|
*
|
|
* @test: Function running the test
|
|
* @th_rc: Expected CTS_RC_* from TH
|
|
* @th_string: Expected string printed by TH
|
|
* @dut_rc: Expected CTR_RC_* from DUT
|
|
* @dut_string: Expected string printed by DUT
|
|
*
|
|
* CTS_TEST macro is processed in multiple places. One is here for creating
|
|
* an array of test functions. Only @test is used.
|
|
*
|
|
* Another is in cts.py for evaluating the test results against expectations.
|
|
*/
|
|
|
|
#undef CTS_TEST
|
|
#define CTS_TEST(test, th_rc, th_string, dut_rc, dut_string) \
|
|
{test, STRINGIFY(test)},
|
|
struct cts_test tests[] = {
|
|
#include "cts.testlist"
|
|
};
|
|
|
|
const int cts_test_count = ARRAY_SIZE(tests);
|