This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GitHub Actions
committed
Apr 28, 2021
1 parent
d5c3469
commit 303293a
Showing
8 changed files
with
1,570 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(json_common_test) | ||
|
||
FILE(GLOB app_sources src/*.c) | ||
target_sources(app PRIVATE ${app_sources}) | ||
|
||
target_include_directories(app PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} ../../src/cloud/cloud_codec/) | ||
|
||
target_sources(app PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} mock/date_time_mock.c | ||
${CMAKE_CURRENT_SOURCE_DIR} ../../src/cloud/cloud_codec/json_common.c | ||
${CMAKE_CURRENT_SOURCE_DIR} ../../src/cloud/cloud_codec/json_helpers.c) | ||
|
||
target_compile_options(app PRIVATE | ||
-DCONFIG_CLOUD_CODEC_LOG_LEVEL=0 | ||
-DCONFIG_ASSET_TRACKER_V2_APP_VERSION_MAX_LEN=20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include <zephyr.h> | ||
|
||
#include "date_time.h" | ||
|
||
/* Mocking function that always converts the input uptime to a known timestamp. */ | ||
int date_time_uptime_to_unix_time_ms(int64_t *uptime) | ||
{ | ||
*uptime = 1563968747123; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
# ZTEST | ||
CONFIG_ZTEST=y | ||
CONFIG_ZTEST_STACKSIZE=4096 | ||
|
||
# cJSON | ||
CONFIG_CJSON_LIB=y | ||
|
||
# General | ||
CONFIG_HEAP_MEM_POOL_SIZE=10240 | ||
CONFIG_NEWLIB_LIBC=y | ||
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
# ZTEST | ||
CONFIG_ZTEST=y | ||
|
||
# cJSON | ||
CONFIG_CJSON_LIB=y | ||
|
||
# General | ||
CONFIG_HEAP_MEM_POOL_SIZE=10240 |
Oops, something went wrong.