mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Split android_junit_tests and move targets in the right package.
This is the first step to move //:android_junit_tests to the righ package (the target is triggering presubmit errors every time //BUILD.gn gets updated). Next steps: * Update recipes * Remove //:android_junit_tests Issues with GN formatting, introduced by [1] will be addressed separately in a "format all" CL. [1] - https://gn-review.googlesource.com/c/gn/+/6860 Bug: webrtc:11289 No-Presubmit: True Change-Id: I70c0927d722911f82dd971c30c7ffb581aed69c0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166603 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30328}
This commit is contained in:
parent
e07790ce87
commit
73aa2de3d7
4 changed files with 48 additions and 2 deletions
2
BUILD.gn
2
BUILD.gn
|
@ -74,6 +74,8 @@ if (!build_with_chromium) {
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
deps += [
|
deps += [
|
||||||
":android_junit_tests",
|
":android_junit_tests",
|
||||||
|
"examples:android_examples_junit_tests",
|
||||||
|
"sdk/android:android_sdk_junit_tests",
|
||||||
"sdk/android:android_instrumentation_test_apk",
|
"sdk/android:android_instrumentation_test_apk",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -854,6 +854,25 @@ if (is_android) {
|
||||||
"//third_party/android_deps:com_android_support_support_annotations_java",
|
"//third_party/android_deps:com_android_support_support_annotations_java",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
junit_binary("android_examples_junit_tests") {
|
||||||
|
sources = [
|
||||||
|
"androidjunit/src/org/appspot/apprtc/BluetoothManagerTest.java",
|
||||||
|
"androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java",
|
||||||
|
"androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":AppRTCMobile_javalib",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//third_party/google-truth:google_truth_java",
|
||||||
|
]
|
||||||
|
|
||||||
|
additional_jar_files = [ [
|
||||||
|
"../sdk/android/tests/resources/robolectric.properties",
|
||||||
|
"robolectric.properties",
|
||||||
|
] ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!build_with_chromium) {
|
if (!build_with_chromium) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ This directory contains example JUnit tests for Android AppRTCMobile.
|
||||||
Many of these test utilize Robolectric to mock Android classes.
|
Many of these test utilize Robolectric to mock Android classes.
|
||||||
|
|
||||||
To compile:
|
To compile:
|
||||||
ninja -C out/Debug android_junit_tests
|
ninja -C out/Debug android_examples_junit_tests
|
||||||
|
|
||||||
To run:
|
To run:
|
||||||
out/Debug/bin/run_android_junit_tests
|
out/Debug/bin/run_android_examples_junit_tests
|
||||||
|
|
|
@ -1564,4 +1564,29 @@ if (is_android) {
|
||||||
namespace = "webrtc::jni"
|
namespace = "webrtc::jni"
|
||||||
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
junit_binary("android_sdk_junit_tests") {
|
||||||
|
sources = [
|
||||||
|
"tests/src/org/webrtc/AndroidVideoDecoderTest.java",
|
||||||
|
"tests/src/org/webrtc/CameraEnumerationTest.java",
|
||||||
|
"tests/src/org/webrtc/CodecTestHelper.java",
|
||||||
|
"tests/src/org/webrtc/CryptoOptionsTest.java",
|
||||||
|
"tests/src/org/webrtc/FakeMediaCodecWrapper.java",
|
||||||
|
"tests/src/org/webrtc/GlGenericDrawerTest.java",
|
||||||
|
"tests/src/org/webrtc/HardwareVideoEncoderTest.java",
|
||||||
|
"tests/src/org/webrtc/IceCandidateTest.java",
|
||||||
|
"tests/src/org/webrtc/ScalingSettingsTest.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":libjingle_peerconnection_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//third_party/google-truth:google_truth_java",
|
||||||
|
]
|
||||||
|
|
||||||
|
additional_jar_files = [ [
|
||||||
|
"tests/resources/robolectric.properties",
|
||||||
|
"robolectric.properties",
|
||||||
|
] ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue