Skip to content

Commit

Permalink
Fix test driver Build (MAC) + Enable a test on efr32 platform (#17559)
Browse files Browse the repository at this point in the history
* Use/install python 3.9 for mac and windows as pigweed now use some 3.9 modules. Enable CHIPCryptoPALTest on efr32 test driver

* Fix python controller build. change python path to python 3.9
  • Loading branch information
jmartinez-silabs authored Apr 20, 2022
1 parent 160de2a commit c77810b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion scripts/python.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"path": "infra/3pp/tools/cpython3/${platform}",
"platforms": ["mac-amd64", "windows-amd64"],
"tags": ["version:3.8.2.chromium.10"]
"tags": ["version:[email protected].chromium.19"]
},
{
"path": "fuchsia/third_party/cmake/${platform}",
Expand Down
6 changes: 4 additions & 2 deletions src/credentials/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ static_library("credentials") {
sources += [ "${chip_root}/examples/platform/nxp/se05x/DeviceAttestationSe05xCredsExample.cpp" ]
}

if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect") {
if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
chip_device_platform == "efr32") {
defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
}

Expand All @@ -89,7 +90,8 @@ static_library("default_attestation_verifier") {
"attestation_verifier/DeviceAttestationDelegate.h",
]

if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect") {
if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
chip_device_platform == "efr32") {
defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
}

Expand Down
9 changes: 3 additions & 6 deletions src/crypto/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ chip_test_suite("tests") {
sources = [
"AES_CCM_128_test_vectors.h",
"AES_CCM_256_test_vectors.h",
"CHIPCryptoPALTest.cpp",
"DerSigConversion_test_vectors.h",
"ECDH_P256_test_vectors.h",
"HKDF_SHA256_test_vectors.h",
Expand All @@ -43,12 +44,8 @@ chip_test_suite("tests") {
"TestCryptoLayer.h",
]

if (chip_device_platform != "efr32") {
# Removed on EFR32, using too much HEAP.
sources += [ "CHIPCryptoPALTest.cpp" ]
}

if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect") {
if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
chip_device_platform == "efr32") {
defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
}

Expand Down
2 changes: 1 addition & 1 deletion src/messaging/tests/TestReliableMessageProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ void CheckGetBackoff(nlTestSuite * inSuite, void * inContext)
{
struct BackoffComplianceTestVector * test = &theBackoffComplianceTestVector[i];
System::Clock::Timestamp backoff = ReliableMessageMgr::GetBackoff(test->backoffBase, test->sendCount);
ChipLogProgress(Test, "Backoff # %d: %d", test->sendCount, (uint32_t) backoff.count());
ChipLogProgress(Test, "Backoff # %d: %" PRIu32, test->sendCount, (uint32_t) backoff.count());

NL_TEST_ASSERT(inSuite, backoff >= test->backoffMin);
NL_TEST_ASSERT(inSuite, backoff <= test->backoffMax);
Expand Down
2 changes: 1 addition & 1 deletion src/pybindings/pycontroller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ shared_library("CHIPController") {
include_dirs = [ "${chip_root}/third_party/pybind11/repo/include" ]
if (current_os == "mac") {
include_dirs +=
[ "${chip_root}/.environment/cipd/packages/python/include/python3.8" ]
[ "${chip_root}/.environment/cipd/packages/python/include/python3.9" ]
} else if (current_os == "linux") {
include_dirs += [ "/usr/include/python3.9" ]
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/test_driver/efr32/include/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configENABLE_BACKWARD_COMPATIBILITY (1)
#define configSUPPORT_STATIC_ALLOCATION (1)
#define configSUPPORT_DYNAMIC_ALLOCATION (1)
#define configTOTAL_HEAP_SIZE ((size_t)(16 * 1024))
#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024))

/* Optional functions - most linkers will remove unused functions anyway. */
#define INCLUDE_vTaskPrioritySet (1)
Expand Down

0 comments on commit c77810b

Please sign in to comment.