Skip to content

Commit

Permalink
fix android build
Browse files Browse the repository at this point in the history
  • Loading branch information
gjc13 committed Sep 10, 2021
1 parent 096e067 commit 97b2e16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/app/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/nlunit_test.gni")

import("${chip_root}/build/chip/chip_test_suite.gni")
import("${chip_root}/src/platform/device.gni")

chip_test_suite("tests") {
output_name = "libAppTests"
Expand All @@ -26,7 +27,6 @@ chip_test_suite("tests") {
"TestClusterInfo.cpp",
"TestCommandInteraction.cpp",
"TestCommandPathParams.cpp",
"TestCommissionManager.cpp",
"TestEventLogging.cpp",
"TestEventPathParams.cpp",
"TestInteractionModelEngine.cpp",
Expand All @@ -40,12 +40,17 @@ chip_test_suite("tests") {

public_deps = [
"${chip_root}/src/app",
"${chip_root}/src/app/server",
"${chip_root}/src/app/util:device_callbacks_manager",
"${chip_root}/src/lib/core",
"${chip_root}/src/messaging/tests:helpers",
"${chip_root}/src/protocols",
"${chip_root}/src/transport/raw/tests:helpers",
"${nlunit_test_root}:nlunit-test",
]

if (chip_config_network_layer_ble &&
(chip_device_platform == "linux" || chip_device_platform == "Darwin")) {
test_sources += [ "TestCommissionManager.cpp" ]
public_deps += [ "${chip_root}/src/app/server" ]
}
}
5 changes: 3 additions & 2 deletions src/app/tests/TestCommissionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

#include "app/server/Mdns.h"
#include <app/server/CommissionManager.h>
#include <app/server/Server.h>
#include <lib/support/Span.h>
Expand Down Expand Up @@ -106,9 +107,9 @@ void CheckCommissionManagerEnhancedWindow(nlTestSuite * suite, void *)
NL_TEST_ASSERT(suite, currentDiscriminator == originDiscriminator);
}

const nlTest sTests[] = { NL_TEST_DEF("CheckCommissionManagerBasicWindowOpenClose", CheckCommissionManagerBasicWindowOpenClose),
const nlTest sTests[] = { NL_TEST_DEF("CheckCommissionManagerEnhancedWindow", CheckCommissionManagerEnhancedWindow),
NL_TEST_DEF("CheckCommissionManagerBasicWindowOpenClose", CheckCommissionManagerBasicWindowOpenClose),
NL_TEST_DEF("CheckCommissionManagerWindowTimeout", CheckCommissionManagerWindowTimeout),
NL_TEST_DEF("CheckCommissionManagerEnhancedWindow", CheckCommissionManagerEnhancedWindow),
NL_TEST_SENTINEL() };

} // namespace
Expand Down

0 comments on commit 97b2e16

Please sign in to comment.