diff options
author | Timo Teräs <timo.teras@iki.fi> | 2019-06-03 16:18:29 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2019-06-03 16:19:17 +0300 |
commit | 1c47f374434aa66fb6620199fd027b96cee446e6 (patch) | |
tree | 3d0c4acc813efd5fd40a1b9d83d1be3e96037856 /src/apk.c | |
parent | 37fbafcd928c466c82c892a7868d686d710e5d07 (diff) | |
download | apk-tools-1c47f374434aa66fb6620199fd027b96cee446e6.tar.gz apk-tools-1c47f374434aa66fb6620199fd027b96cee446e6.tar.bz2 apk-tools-1c47f374434aa66fb6620199fd027b96cee446e6.tar.xz apk-tools-1c47f374434aa66fb6620199fd027b96cee446e6.zip |
use fixed system time in test mode to have fixed test output
fixes test suite regression from previous commit
Diffstat (limited to 'src/apk.c')
-rw-r--r-- | src/apk.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -47,6 +47,15 @@ static struct apk_string_array *test_repos; char **apk_argv; +time_t apk_time(void) +{ +#ifdef TEST_MODE + return 1559567666; +#else + return time(NULL); +#endif +} + static void version(void) { printf("apk-tools " APK_VERSION ", compiled for " APK_DEFAULT_ARCH ".\n" |