Skip to content

Commit

Permalink
Add fake platform argument to running fake tests, exclude TestFailsaf… (
Browse files Browse the repository at this point in the history
#20091)

* Add fake platform argument to running fake tests, exclude TestFailsafeContext from fake platform (no timer impl)

* Restyle
  • Loading branch information
andy31415 authored and pull[bot] committed Aug 17, 2022
1 parent 4d1c74a commit 2347161
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def GnBuildArgs(self):
'custom_toolchain="//build/toolchain/fake:fake_x64_gcc"',
'chip_link_tests=true',
'chip_device_platform="fake"',
'chip_fake_platform=true',
]
)
return self.extra_gn_options
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/build_linux_on_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-casting-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-tv-casting-app-ipv6only'

# Generating linux-fake-tests
gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=chip_build_tests=true custom_toolchain="//build/toolchain/fake:fake_x64_gcc" chip_link_tests=true chip_device_platform="fake"' {out}/linux-fake-tests
gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=chip_build_tests=true custom_toolchain="//build/toolchain/fake:fake_x64_gcc" chip_link_tests=true chip_device_platform="fake" chip_fake_platform=true' {out}/linux-fake-tests

# Generating linux-x64-address-resolve-tool
gn gen --check --fail-on-unused-args --export-compile-commands --root={root} {out}/linux-x64-address-resolve-tool
Expand Down
5 changes: 4 additions & 1 deletion src/app/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ chip_test_suite("tests") {
"TestEventOverflow.cpp",
"TestEventPathParams.cpp",
"TestFabricScopedEventLogging.cpp",
"TestFailSafeContext.cpp",
"TestInteractionModelEngine.cpp",
"TestMessageDef.cpp",
"TestNumericAttributeTraits.cpp",
Expand All @@ -96,6 +95,10 @@ chip_test_suite("tests") {
"TestWriteInteraction.cpp",
]

if (!chip_fake_platform) {
test_sources += [ "TestFailSafeContext.cpp" ]
}

#
# On NRF platforms, the allocation of a large number of pbufs in this test
# to exercise chunking causes it to run out of memory. For now, disable it there.
Expand Down

0 comments on commit 2347161

Please sign in to comment.