summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-10-24 15:08:59 -0600
committerJack Rosenthal <jrosenth@chromium.org>2019-10-25 02:48:19 +0000
commited997d3802c4bf5c2ef42938af1dd8c72c09de65 (patch)
tree02c8b832b55c5b6b34bffeb4649a73189ed69db8
parent16275bb36d338dd952b9312450c0cee110d5468c (diff)
downloadchrome-ec-ed997d3802c4bf5c2ef42938af1dd8c72c09de65.tar.gz
host: remove leftovers from using system clock in tests
There was some leftover constants and a #include we are no longer using due to using a monotonic counter, clean it up. BUG=chromium:1013701 BRANCH=none TEST=buildall Change-Id: Ieeb130aef9ee89d65459f52c8f34753c30c3c388 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879335 Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r--Makefile.toolchain1
-rw-r--r--core/host/timer.c21
-rw-r--r--test/build.mk1
3 files changed, 0 insertions, 23 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 49a453d1a0..f7ae354b10 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -62,7 +62,6 @@ CFLAGS_TEST=$(if $(TEST_BUILD),-DTEST_BUILD=$(EMPTY) \
-DTEST_TASKFILE=$(PROJECT).tasklist,) \
$(if $(CTS_MODULE), $(CFLAGS_CTS)) \
$(if $(EMU_BUILD),-DEMU_BUILD=$(EMPTY)) \
- $(if $($(PROJECT)-scale),-DTEST_TIME_SCALE=$($(PROJECT)-scale)) \
-DTEST_$(PROJECT)=$(EMPTY) -DTEST_$(UC_PROJECT)=$(EMPTY) \
$(if $(TEST_ASAN),-fsanitize=address) \
$(if $(TEST_MSAN),-fsanitize=memory) \
diff --git a/core/host/timer.c b/core/host/timer.c
index f7067dce08..c99c002533 100644
--- a/core/host/timer.c
+++ b/core/host/timer.c
@@ -7,33 +7,12 @@
#include <stdint.h>
#include <stdio.h>
-#include <time.h>
#include "task.h"
#include "test_util.h"
#include "timer.h"
#include "util.h"
-/*
- * For test that need to test for longer than the default time limit,
- * adjust its time scale in test/build.mk by specifying
- * <test_name>-scale=<new scale>.
- */
-#ifndef TEST_TIME_SCALE
-#define TEST_TIME_SCALE 1
-#endif
-
-/*
- * To increase the stability of timing sensitive unit tests, slow
- * down the time by 10x. This only affects active run time (including
- * udelay() calls). To an unit test, the only effect is increased code
- * execution speed. However, this comes at the cost of prolonged test
- * run time for tests that use udelay(). Fortunately, most of our tests
- * use usleep/msleep, and for tests that use udelay(), we can scale
- * the time as mentioned above.
- */
-#define TEST_TIME_SLOW_DOWN 10
-
static timestamp_t boot_time;
static int time_set;
diff --git a/test/build.mk b/test/build.mk
index f4f2d5d44b..b11e055e0f 100644
--- a/test/build.mk
+++ b/test/build.mk
@@ -109,7 +109,6 @@ fpsensor-y=fpsensor.o
hooks-y=hooks.o
host_command-y=host_command.o
inductive_charging-y=inductive_charging.o
-interrupt-scale=10
interrupt-y=interrupt.o
is_enabled-y=is_enabled.o
kb_8042-y=kb_8042.o