forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Pigweed support for android tests, fix related bugs (project-chip…
…#32704) * Add pigweed support for android example * Fix ChipTest-JNI to use gn * Fix gradle script * Use new configuration for android in build_example * Fix java src/controller java add missing data model * set C++17 in cmake - i think it will be useless but I will leave it right now * Add gn build support for ChipTest on Android platform * Fix android app build * Make app works on real device * Update .so name, link logging library * Add support for PW testing * Restore dry run android * Fix android stack lock * Build android chip-tests * Add command launcher support for android * Make platform test on android run * Add pw_test_wrapper for all platform * Cleanup pr modifications * Clean .idea files * Remove commented out code * Remove test code * Restyled by clang-format * Restyled by autopep8 * Add JniLocalReferenceScope Remove ThrowError and N2J_Error - these function operate on env variable and are trying to trow an exception using it but, were called only when env was nullptr * Fix CHIP_DEVICE_CONFIG_DYNAMIC_SERVER macro * Fix dry run test for android chip tool * Add controller_config target to correctly setup CHIP_DEVICE_CONFIG_DYNAMIC_SERVER * Remove .idea files * Date update --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Yunhan Wang <[email protected]>
- Loading branch information
1 parent
f2353ad
commit a0ace35
Showing
16 changed files
with
300 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) 2024 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/build.gni") | ||
|
||
# The location of the build configuration file. | ||
buildconfig = "${build_root}/config/BUILDCONFIG.gn" | ||
|
||
# CHIP uses angle bracket includes. | ||
check_system_includes = true | ||
|
||
default_args = { | ||
import("//args.gni") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright (c) 2024 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/build.gni") | ||
import("//build_overrides/chip.gni") | ||
|
||
import("${build_root}/config/android_abi.gni") | ||
import("${chip_root}/build/chip/chip_build.gni") | ||
import("${chip_root}/build/chip/java/rules.gni") | ||
import("${chip_root}/build/chip/tools.gni") | ||
|
||
shared_library("jni") { | ||
output_name = "libCHIPTest" | ||
|
||
sources = [ "app/src/main/cpp/CHIPTest-JNI.cpp" ] | ||
|
||
deps = [ | ||
"${chip_root}/src:tests", | ||
"${chip_root}/src/controller/java", | ||
"${chip_root}/src/controller/java:onboarding_payload", | ||
"${chip_root}/src/lib", | ||
"${chip_root}/src/lib/support", | ||
"${chip_root}/src/lib/support:pw_tests_wrapper", | ||
"${chip_root}/src/lib/support:test_utils", | ||
"${chip_root}/src/lib/support:testing_nlunit", | ||
"${chip_root}/src/lib/support/jsontlv", | ||
"${chip_root}/src/platform", | ||
"${chip_root}/src/platform/android", | ||
"${chip_root}/src/platform/android:java", | ||
"${chip_root}/src/platform/logging:android", | ||
"${chip_root}/src/platform/tests:tests", | ||
"${chip_root}/third_party/inipp", | ||
"${chip_root}/third_party/nlfaultinjection:nlfaultinjection", | ||
] | ||
|
||
cflags = [ "-Wconversion" ] | ||
|
||
output_dir = "${root_out_dir}/lib/jni/${android_abi}" | ||
|
||
ldflags = [ "-Wl,--gc-sections" ] | ||
|
||
libs = [ "log" ] | ||
} | ||
|
||
android_library("java") { | ||
output_name = "CHIPTest.jar" | ||
|
||
deps = [ | ||
":android", | ||
"${chip_root}/third_party/android_deps:annotation", | ||
] | ||
|
||
data_deps = [ | ||
":jni", | ||
"${chip_root}/build/chip/java:shared_cpplib", | ||
] | ||
|
||
sources = [ "app/src/main/java/com/tcl/chip/chiptest/TestEngine.java" ] | ||
|
||
javac_flags = [ "-Xlint:deprecation" ] | ||
} | ||
|
||
java_prebuilt("android") { | ||
jar_path = "${android_sdk_root}/platforms/android-26/android.jar" | ||
} | ||
|
||
group("default") { | ||
deps = [ | ||
":java", | ||
":jni", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.