Skip to content

Commit

Permalink
End to end executed everywhere
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Orru <[email protected]>
  • Loading branch information
sorru94 committed Nov 21, 2024
1 parent accea8e commit 35ccc8f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion e2e/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ menu "E2E test"
config TLS_CERTIFICATE_PATH
string "Path of the tls certificate"
help
Path to a certificate, the file byte's will be included in the binary and used for https and mqtts connection
Path to a certificate in PEM format. it will be included in the binary and used for TLS
authentication.
This path should be relative to the end to end project folder.

config DEVICE_ID
string "Astarte device ID"
Expand Down
2 changes: 1 addition & 1 deletion e2e/certificate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(NOT DEFINED ${CERTIFICATE_PATH_VAR})
return()
endif()

get_filename_component(certificate_file ${${CERTIFICATE_PATH_VAR}} ABSOLUTE)
get_filename_component(certificate_file ${CMAKE_SOURCE_DIR}/${${CERTIFICATE_PATH_VAR}} ABSOLUTE)

if(NOT EXISTS ${certificate_file})
message(ERROR "The file path '${certificate_file}' specified in '${CERTIFICATE_PATH_VAR}' does not exist, provide a valid file or remove the option")
Expand Down
6 changes: 4 additions & 2 deletions e2e/pytest/cfgvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: Apache-2.0

from typing import Optional
import os
from pathlib import Path

from dotenv import dotenv_values

Expand All @@ -26,8 +28,8 @@ def __init__(self, config_file_path: str) -> None:
self.device_id: str = self._get_config_value(prj_config, "CONFIG_DEVICE_ID")
self.appengine_url: str = self._get_config_value(prj_config, "CONFIG_E2E_APPENGINE_URL")
self.appengine_token: str = self._get_config_value(prj_config, "CONFIG_E2E_APPENGINE_TOKEN")
self.appengine_cert: bool | str = self._get_config_value(
prj_config, "CONFIG_TLS_CERTIFICATE_PATH"
self.appengine_cert: Path = Path(os.path.abspath(__file__)).parent.parent.joinpath(
self._get_config_value(prj_config, "CONFIG_TLS_CERTIFICATE_PATH")
)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion lib/astarte_device_sdk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ config ASTARTE_DEVICE_SDK_ADVANCED_CODE_GENERATION_INTERFACE_DIRECTORY
string "Path to the interface json directory"
depends on ASTARTE_DEVICE_SDK_ADVANCED_CODE_GENERATION
help
This must be set to the path of a directory containing valid interface jsons.
This must be set to the relative path of a directory containing valid interface jsons.
Generated interfaces may then be included by adding `#include "astarte_generated_interfaces.h"`.

endmenu
Expand Down

0 comments on commit 35ccc8f

Please sign in to comment.