Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Bringing changes for AFR Release 202002.00 (aws#1723)
Browse files Browse the repository at this point in the history
* Fix a dependency parsing bug in CMake from aws#1161 (aws#1655)

In previous PR when we add a feature to disable building demos and
test, we add a check to not search dependencies of aws_demos and
aws_tests target when demos or tests are disabled. But we forgot to also
move adding the dependencies to demos_base and tests_base inside the
check. As a result, the "dependencies" from previous for loop was added
to demos_base and tests_base.

* Add board dir for cypress in CMake (aws#1684)

* Merge pull request aws#1700 from tgsong/ota_e2e_s3_cleanup

Only delete files uploaded in OTA E2E

* OTA e2e scripts: Replace dots with underscores (aws#1717)

* Update FreeRTOS-Kernel submodule branch to release-candidate

Update FreeRTOS-Kernel submodule branch from V10.2.1-convergence-FreeRTOS-Source
to release-candidate_10.3.0_rc3
commit id: d7550ef1a0560ceddac7c0b8bc0148272ac641a6

Co-authored-by: Tiangang Song <[email protected]>
Co-authored-by: Pavan Madehalli Ranganath <[email protected]>
  • Loading branch information
3 people authored and VanNamDinh committed Mar 17, 2020
1 parent 52b97b3 commit e65f15b
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[submodule "freertos_kernel"]
path = freertos_kernel
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
branch = V10.2.1-convergence-FreeRTOS-Source
branch = release-candidate_10.3.0_rc3
[submodule "pkcs11"]
path = libraries/3rdparty/pkcs11
url = https://github.com/amazon-freertos/pkcs11.git
Expand Down
2 changes: 1 addition & 1 deletion freertos_kernel
Submodule freertos_kernel updated 525 files
2 changes: 1 addition & 1 deletion tools/cmake/afr_module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ function(afr_resolve_dependencies)
# If neither demos nor tests are enabled, then don't search the aws_demos/aws_tests targets.
if(AFR_ENABLE_DEMOS OR AFR_ENABLE_TESTS)
__search_afr_dependencies(${exe_target} dependencies)
afr_module_dependencies(${exe_base} INTERFACE ${dependencies})
endif()
afr_module_dependencies(${exe_base} INTERFACE ${dependencies})

# Make sure kernel can be enabled first.
__resolve_dependencies(kernel)
Expand Down
7 changes: 4 additions & 3 deletions tools/ota_e2e_tests/aws_ota_test/aws_ota_aws_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ def __init__(self, name, stageParams):
self.s3_name = name
self.s3_bucket = self._s3_client.Bucket(self.s3_name)
self.__create_bucket()
self.s3_keys = []

def __create_bucket(self):
response = None
Expand All @@ -747,6 +748,7 @@ def __create_bucket(self):
raise Exception(f'ERROR: Bucket {self.s3_name} already exist and it is in region {response_region}. However testing in gamma or beta only supports us-west-2 and us-east-1.')

def upload_file(self, file_path, file_name):
self.s3_keys.append(file_name)
self._s3_client.Bucket(self.s3_name).upload_file(file_path, file_name)

def download_file(self, key, file_path):
Expand All @@ -767,9 +769,8 @@ def cleanup(self):
except:
# Bucket doesn't exist nothing to clean.
return
self.s3_bucket.object_versions.delete()
# We will no longer delete the bucket because we want to keep our bucket name.
#self.s3_bucket.delete()
for key in self.s3_keys:
self._s3_client.Object(self.s3_name, key).delete()

def __enter__(self):
return self
Expand Down
3 changes: 2 additions & 1 deletion tools/ota_e2e_tests/aws_ota_test/aws_ota_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def __init__(self, boardConfig, stageParams):
self._stageParams = stageParams
self._otaConfig = boardConfig['ota_config']
self._otaProject = OtaAfrProject(boardConfig)
self._otaAwsAgent = OtaAwsAgent(self._boardConfig['name'], self._otaConfig, stageParams, True)
# OTA jobs only accept underscore and no dots. We replace dots with underscores for all IoT Core related names.
self._otaAwsAgent = OtaAwsAgent(self._boardConfig['name'].replace('.', '_'), self._otaConfig, stageParams, True)
# FlashSerialComm opens a thread. If there is an exception in OtaAwsAgent we want to exit the program, so this is initialized last.
self._flashComm = FlashSerialComm(boardConfig['flash_config'], boardConfig['flash_config']['output'], self._otaConfig['device_firmware_file_name'])

Expand Down
185 changes: 136 additions & 49 deletions tools/ota_e2e_tests/poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tools/ota_e2e_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ junit-xml = "^1.8"
boto3 = "^1.9"
pyopenssl = "^18.0.0"
future = "^0.17.1"
pyparsing = ">=2.0.3,<2.4.0"

[tool.poetry.dev-dependencies]

Expand Down
2 changes: 2 additions & 0 deletions vendors/cypress/manifest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ set(
)

set(AFR_MANIFEST_BOARD_DIR "boards")
set(AFR_MANIFEST_BOARD_DIR_cypress43 "boards/CYW943907AEVAL1F")
set(AFR_MANIFEST_BOARD_DIR_cypress54 "boards/CYW954907AEVAL1F")

0 comments on commit e65f15b

Please sign in to comment.