summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-11-11 11:32:48 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-18 04:54:32 +0000
commitbe18c0b0e8cb2d2012c905e73c8dd159e950f5b3 (patch)
tree31b7e4cfa39f5d25075f5ea54b4b8e3cb6a632b7 /test
parentb5bc684e20fa4470de3a651dde0136bc6204c8e3 (diff)
downloadchrome-ec-be18c0b0e8cb2d2012c905e73c8dd159e950f5b3.tar.gz
Revert "common: Add uptime host command"
This reverts commit af51b9ea19c0ba4c6d57cdc4c5f3380647be3034. BUG=b:200823466 TEST=make buildall -j Change-Id: Ib620967f239dd2ee3fdd0f4749d08bd544509fcb Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285747 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/build.mk2
-rw-r--r--test/uptime.c73
-rw-r--r--test/uptime.tasklist10
3 files changed, 0 insertions, 85 deletions
diff --git a/test/build.mk b/test/build.mk
index 84e3b9f2f1..4072459707 100644
--- a/test/build.mk
+++ b/test/build.mk
@@ -50,7 +50,6 @@ test-list-host += system
test-list-host += thermal
test-list-host += timer_dos
test-list-host += u2f
-test-list-host += uptime
test-list-host += utils
test-list-host += utils_str
test-list-host += vboot
@@ -96,7 +95,6 @@ timer_calib-y=timer_calib.o
timer_dos-y=timer_dos.o
u2f-y=u2f.o
u2f-y+=../board/cr50/dcrypto/u2f.o
-uptime-y=uptime.o
utils-y=utils.o
utils_str-y=utils_str.o
vboot-y=vboot.o
diff --git a/test/uptime.c b/test/uptime.c
deleted file mode 100644
index 7ff39f98db..0000000000
--- a/test/uptime.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright 2019 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 <stdbool.h>
-
-#include "common.h"
-#include "ec_commands.h"
-#include "host_command.h"
-#include "test_util.h"
-#include "timer.h"
-#include "util.h"
-
-static bool get_ap_reset_stats_should_succeed = true;
-
-/* Mocks */
-
-enum ec_error_list
-get_ap_reset_stats(struct ap_reset_log_entry *reset_log_entries,
- size_t num_reset_log_entries, uint32_t *resets_since_ec_boot)
-{
- return get_ap_reset_stats_should_succeed ? EC_SUCCESS : EC_ERROR_INVAL;
-}
-
-timestamp_t get_time(void)
-{
- timestamp_t fake_time = { .val = 42 * MSEC };
- return fake_time;
-}
-
-/* Tests */
-
-test_static int test_host_uptime_info_command_success(void)
-{
- int rv;
- struct ec_response_uptime_info resp = { 0 };
-
- get_ap_reset_stats_should_succeed = true;
-
- rv = test_send_host_command(EC_CMD_GET_UPTIME_INFO, 0, NULL, 0, &resp,
- sizeof(resp));
-
- TEST_ASSERT(rv == EC_RES_SUCCESS);
- TEST_ASSERT(resp.time_since_ec_boot_ms == 42);
-
- return EC_RES_SUCCESS;
-}
-
-test_static int test_host_uptime_info_command_failure(void)
-{
- int rv;
- struct ec_response_uptime_info resp = { 0 };
-
- get_ap_reset_stats_should_succeed = false;
-
- rv = test_send_host_command(EC_CMD_GET_UPTIME_INFO, 0, NULL, 0, &resp,
- sizeof(resp));
-
- TEST_ASSERT(rv == EC_RES_ERROR);
-
- return EC_RES_SUCCESS;
-}
-
-void run_test(void)
-{
- test_reset();
-
- RUN_TEST(test_host_uptime_info_command_success);
- RUN_TEST(test_host_uptime_info_command_failure);
-
- test_print_result();
-}
diff --git a/test/uptime.tasklist b/test/uptime.tasklist
deleted file mode 100644
index 9bf1c80c20..0000000000
--- a/test/uptime.tasklist
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright 2019 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.
- */
-
-/**
- * See CONFIG_TASK_LIST in config.h for details.
- */
-#define CONFIG_TEST_TASK_LIST
-