Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enabling unit tests for EFR32 which had been disabled due to flash limitations #35456

Merged
merged 31 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ae7adf3
Removed as many efr32 checks as possible without having to make code …
feasel0 Sep 6, 2024
a2d4b27
Updated comments to show error message
feasel0 Sep 6, 2024
1f0c2b0
Restyled by clang-format
restyled-commits Sep 6, 2024
64bf06a
Comment updates
feasel0 Sep 17, 2024
75cf902
ci testing 1
feasel0 Sep 19, 2024
d382fb3
Re-added suites
feasel0 Sep 20, 2024
d4073d8
.
feasel0 Sep 25, 2024
7e975f0
.
feasel0 Sep 25, 2024
716131e
comment icd tests
feasel0 Sep 26, 2024
282b73b
removed 5 tests from line 112
feasel0 Sep 26, 2024
a134d9f
re-enable app/tests in the main tests group
feasel0 Sep 27, 2024
90a70e7
reverted to original (with inconsequential mods)
feasel0 Sep 27, 2024
36f0c10
(addendum) Now actually reverted back to original state (with inconse…
feasel0 Sep 27, 2024
fdf899e
moved 4 dirs up into the main tests lists
feasel0 Sep 28, 2024
fc681b0
enabled 3-test-set for efr32
feasel0 Sep 28, 2024
16c7a38
moved tracing tests out of the if
feasel0 Sep 28, 2024
c6b4fbe
enable platform tests for efr32
feasel0 Sep 28, 2024
0285cd3
enabled controller and datamodel tests but not the stuff in controller
feasel0 Sep 29, 2024
687b7b4
enabled all tests in controller
feasel0 Sep 29, 2024
d50d326
add transport tests back in
feasel0 Sep 29, 2024
170342a
enabled data_model Test[Commands,Read,Write]
feasel0 Sep 29, 2024
02e704b
commands is in, read/write is out
feasel0 Sep 29, 2024
19597f2
added TestRead
feasel0 Sep 30, 2024
e799005
Added TestWrite, removed TestRead
feasel0 Sep 30, 2024
218fe80
src/app/tests remains disabled
feasel0 Oct 18, 2024
8982e17
changed c-style cast to static_cast
feasel0 Oct 18, 2024
a50e3b3
Added TestTLVVectorWriter.cpp back in
feasel0 Oct 18, 2024
b3cc84c
comment update
feasel0 Oct 18, 2024
688323f
Merge branch 'master' of https://github.com/feasel0/connectedhomeip i…
feasel0 Oct 18, 2024
95bfd84
restyle fixes
feasel0 Oct 18, 2024
5046265
restyle fixes
feasel0 Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 20 additions & 23 deletions src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,25 @@ if (chip_build_tests) {
chip_test_group("tests") {
deps = []
tests = [
"${chip_root}/src/access/tests",
"${chip_root}/src/app/data-model/tests",
"${chip_root}/src/app/cluster-building-blocks/tests",
"${chip_root}/src/app/data-model-provider/tests",
"${chip_root}/src/access/tests",
"${chip_root}/src/app/icd/server/tests",
"${chip_root}/src/crypto/tests",
"${chip_root}/src/inet/tests",
"${chip_root}/src/lib/address_resolve/tests",
"${chip_root}/src/lib/asn1/tests",
"${chip_root}/src/lib/core/tests",
"${chip_root}/src/lib/format/tests",
"${chip_root}/src/messaging/tests",
"${chip_root}/src/protocols/bdx/tests",
"${chip_root}/src/protocols/interaction_model/tests",
"${chip_root}/src/protocols/secure_channel/tests",
"${chip_root}/src/protocols/user_directed_commissioning/tests",
"${chip_root}/src/system/tests",
"${chip_root}/src/transport/retransmit/tests",
"${chip_root}/src/app/icd/server/tests",
"${chip_root}/src/transport/tests",
]

# Skip DNSSD tests for Mbed platform due to flash memory size limitations
Expand All @@ -81,14 +85,12 @@ if (chip_build_tests) {
tests += [ "${chip_root}/src/lib/dnssd/minimal_mdns/records/tests" ]
}

if (current_os != "zephyr" && current_os != "mbed" &&
chip_device_platform != "efr32") {
if (current_os != "zephyr" && current_os != "mbed") {
# Avoid these items from "one single binary" test executions. Once tests
# are split, we can re-visit this (and likely many others)
# are split, we can re-visit this (and likely many others).
#
# In particular:
# "app/codegen-data-model-provider/tests" contains symbols for ember mocks which
# are used by other tests
# In particular: "app/codegen-data-model-provider/tests" contains
# symbols for ember mocks which are used by other tests.

tests += [
"${chip_root}/src/app/codegen-data-model-provider/tests",
Expand All @@ -97,30 +99,27 @@ if (chip_build_tests) {
]
}

# Skip on efr32 due to flash and/or ram limitations.
if (chip_device_platform != "efr32") {
tests += [ "${chip_root}/src/app/tests" ]

# Disabled for EFR32 because _open is not implemented.
# https://github.com/project-chip/connectedhomeip/issues/35624
tests += [
"${chip_root}/src/app/tests",
"${chip_root}/src/credentials/tests",
"${chip_root}/src/lib/format/tests",
"${chip_root}/src/lib/support/tests",
"${chip_root}/src/protocols/secure_channel/tests",
"${chip_root}/src/system/tests",
"${chip_root}/src/transport/tests",
]
}

if (matter_enable_tracing_support &&
matter_trace_config == "${chip_root}/src/tracing/multiplexed") {
tests += [ "${chip_root}/src/tracing/tests" ]
}
if (matter_enable_tracing_support &&
matter_trace_config == "${chip_root}/src/tracing/multiplexed") {
tests += [ "${chip_root}/src/tracing/tests" ]
}

if (chip_device_platform != "none") {
tests += [ "${chip_root}/src/lib/dnssd/minimal_mdns/tests" ]
}

if (chip_device_platform != "esp32" && chip_device_platform != "efr32" &&
chip_device_platform != "ameba") {
if (chip_device_platform != "esp32" && chip_device_platform != "ameba") {
tests += [ "${chip_root}/src/platform/tests" ]
}

Expand All @@ -130,9 +129,7 @@ if (chip_build_tests) {

# On nrfconnect, the controller tests run into
# https://github.com/project-chip/connectedhomeip/issues/9630
if (chip_device_platform != "nrfconnect" &&
chip_device_platform != "efr32") {
# Doesn't compile on ef32. Multiple definitions issues with attribute storage and overflows flash memory.
if (chip_device_platform != "nrfconnect") {
tests += [ "${chip_root}/src/controller/tests/data_model" ]

# Skip controller test for Open IoT SDK
Expand Down
32 changes: 21 additions & 11 deletions src/controller/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,27 @@ import("${chip_root}/build/chip/chip_test_suite.gni")
chip_test_suite("tests") {
output_name = "libControllerTests"

test_sources = [ "TestCommissionableNodeController.cpp" ]

if (chip_device_platform != "mbed" && chip_device_platform != "efr32" &&
chip_device_platform != "esp32") {
test_sources += [ "TestServerCommandDispatch.cpp" ]
test_sources += [ "TestEventChunking.cpp" ]
test_sources += [ "TestEventCaching.cpp" ]
test_sources += [ "TestReadChunking.cpp" ]
test_sources += [ "TestWriteChunking.cpp" ]
test_sources += [ "TestEventNumberCaching.cpp" ]
test_sources += [ "TestCommissioningWindowOpener.cpp" ]
test_sources = []

# Not supported on efr32.
if (chip_device_platform != "efr32") {
test_sources += [ "TestCommissionableNodeController.cpp" ]
}

if (chip_device_platform != "mbed" && chip_device_platform != "esp32") {
test_sources += [
"TestEventCaching.cpp",
"TestEventChunking.cpp",
"TestEventNumberCaching.cpp",
"TestReadChunking.cpp",
"TestServerCommandDispatch.cpp",
"TestWriteChunking.cpp",
]

# Not supported on efr32.
if (chip_device_platform != "efr32") {
test_sources += [ "TestCommissioningWindowOpener.cpp" ]
}
}

cflags = [ "-Wconversion" ]
Expand Down
2 changes: 1 addition & 1 deletion src/controller/tests/TestReadChunking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ TEST_F(TestReadChunking, TestListChunking)
{
TestReadCallback readCallback;

ChipLogDetail(DataManagement, "Running iteration %d\n", packetSize);
ChipLogDetail(DataManagement, "Running iteration %d\n", static_cast<int>(packetSize));

gIterationCount = packetSize;

Expand Down
2 changes: 1 addition & 1 deletion src/controller/tests/TestWriteChunking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ TEST_F(TestWriteChunking, TestListChunking)
CHIP_ERROR err = CHIP_NO_ERROR;
TestWriteCallback writeCallback;

ChipLogDetail(DataManagement, "Running iteration %d\n", i);
ChipLogDetail(DataManagement, "Running iteration %d\n", static_cast<int>(i));

gIterationCount = i;

Expand Down
8 changes: 5 additions & 3 deletions src/controller/tests/data_model/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ chip_test_suite("data_model") {
]

test_sources = []
if (chip_device_platform != "mbed" && chip_device_platform != "efr32" &&
chip_device_platform != "esp32" && chip_device_platform != "fake") {
if (chip_device_platform != "mbed" && chip_device_platform != "esp32" &&
chip_device_platform != "fake") {
test_sources += [
"TestCommands.cpp",
"TestRead.cpp",
"TestWrite.cpp",
]
if (chip_device_platform != "efr32") {
test_sources += [ "TestRead.cpp" ]
}
}

public_deps = [
Expand Down
7 changes: 1 addition & 6 deletions src/lib/core/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,9 @@ chip_test_suite("tests") {
"TestOptional.cpp",
"TestReferenceCounted.cpp",
"TestTLV.cpp",
"TestTLVVectorWriter.cpp",
]

# requires large amount of heap for multiple unfragmented 10k buffers
# skip for efr32 to allow flash space for other tests
if (chip_device_platform != "efr32") {
test_sources += [ "TestTLVVectorWriter.cpp" ]
}

cflags = [ "-Wconversion" ]

public_deps = [
Expand Down
5 changes: 2 additions & 3 deletions src/transport/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ chip_test_suite("tests") {
"TestSessionManagerDispatch.cpp",
]

if (chip_device_platform != "mbed" && chip_device_platform != "efr32" &&
chip_device_platform != "esp32" && chip_device_platform != "nrfconnect" &&
chip_device_platform != "nxp") {
if (chip_device_platform != "mbed" && chip_device_platform != "esp32" &&
chip_device_platform != "nrfconnect" && chip_device_platform != "nxp") {
test_sources += [ "TestSecureSessionTable.cpp" ]
}

Expand Down
Loading