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:
Mirko Bonadei
2020-01-20 15:28:57 +01:00
committed by Commit Bot
parent e07790ce87
commit 73aa2de3d7
4 changed files with 48 additions and 2 deletions

View File

@ -854,6 +854,25 @@ if (is_android) {
"//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) {

View File

@ -2,7 +2,7 @@ This directory contains example JUnit tests for Android AppRTCMobile.
Many of these test utilize Robolectric to mock Android classes.
To compile:
ninja -C out/Debug android_junit_tests
ninja -C out/Debug android_examples_junit_tests
To run:
out/Debug/bin/run_android_junit_tests
out/Debug/bin/run_android_examples_junit_tests