From c10d22e5b71273adb492ef220a779d7d4da7f751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 20 Oct 2020 14:14:42 +0200 Subject: test/core: add time(3) stub for tis-interpreter Not sure why a deterministic stub implementation is not provided by the CI environment[1], even though the public tis-interpreter repositories contain relevant code[2,3]. [1] https://github.com/TrustInSoft-CI/TrustInSoft-CI/issues/12 [2] https://github.com/TrustInSoft/tis-kernel/blob/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/share/tis-interpreter/common_time.c#L148 [3] https://github.com/TrustInSoft/tis-interpreter/blob/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/tis-interpreter/common_helpers/common_time.c#L138 --- core/tap.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/tap.h b/core/tap.h index 2a16ef6..390eb6f 100644 --- a/core/tap.h +++ b/core/tap.h @@ -36,6 +36,15 @@ static int exit_status() { } \ } while (0) +#include +time_t time(time_t *p) +{ + static time_t value; + value++; + if (p) *p = value; + return value; +} + #else #include #define TIS_INTERPRETER 0 -- cgit v1.2.3