From 4bb04985c49aaf8bd38bfffa5ac7f98751f5daf4 Mon Sep 17 00:00:00 2001 From: kjellander Date: Mon, 19 Sep 2016 08:53:23 -0700 Subject: [PATCH] Merge AppRTCDemoJUnitTest into android_junit_tests target With the small number of tests these targets contain, it makes more sense to gather them into android_junit_tests instead, which was created to be a high-level target containing all the junit tests. BUG=chromium:647390 NOTRY=True Review-Url: https://codereview.webrtc.org/2347403002 Cr-Commit-Position: refs/heads/master@{#14292} --- webrtc/BUILD.gn | 7 ++++++- webrtc/examples/BUILD.gn | 13 ------------- webrtc/examples/androidjunit/README | 4 ++-- webrtc/webrtc_examples.gyp | 23 ----------------------- 4 files changed, 8 insertions(+), 39 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 5b5ed165b8..b28bef811c 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -834,11 +834,16 @@ if (rtc_include_tests) { if (is_android) { junit_binary("android_junit_tests") { - java_files = [ "androidjunit/src/org/webrtc/CameraEnumerationTest.java" ] + java_files = [ + "androidjunit/src/org/webrtc/CameraEnumerationTest.java", + "examples/androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java", + "examples/androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java", + ] deps = [ "//webrtc/api:libjingle_peerconnection_java", "//webrtc/api:libjingle_peerconnection_jni", + "//webrtc/examples:AppRTCDemo_javalib", ] } } diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn index 4ebfeaffcb..e61f15f838 100644 --- a/webrtc/examples/BUILD.gn +++ b/webrtc/examples/BUILD.gn @@ -102,19 +102,6 @@ if (is_android) { "//webrtc/api:libjingle_peerconnection_java", ] } - - junit_binary("AppRTCDemoJUnitTest") { - java_files = [ - "androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java", - "androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java", - ] - - deps = [ - ":AppRTCDemo_javalib", - "//webrtc/api:libjingle_peerconnection_java", - "//webrtc/api:libjingle_peerconnection_jni", - ] - } } if (is_ios || (is_mac && target_cpu != "x86")) { diff --git a/webrtc/examples/androidjunit/README b/webrtc/examples/androidjunit/README index 502d71460f..f110cedcb0 100644 --- a/webrtc/examples/androidjunit/README +++ b/webrtc/examples/androidjunit/README @@ -2,7 +2,7 @@ This directory contains example JUnit tests for Android AppRTCDemo. Many of these test utilize Robolectric to mock Android classes. To compile: -ninja -C out/Debug AppRTCDemoJUnitTest +ninja -C out/Debug android_junit_tests To run: -out/Debug/bin/run_AppRTCDemoJUnitTest +out/Debug/bin/run_android_junit_tests diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp index 02854626c8..32e12aa938 100755 --- a/webrtc/webrtc_examples.gyp +++ b/webrtc/webrtc_examples.gyp @@ -459,29 +459,6 @@ '../build/android/test_runner.gypi', ], }, - - { - 'target_name': 'AppRTCDemoJUnitTest', - 'type': 'none', - 'dependencies': [ - 'AppRTCDemo_apk', - '<(DEPTH)/base/base.gyp:base_java', - '<(DEPTH)/base/base.gyp:base_java_test_support', - '<(DEPTH)/base/base.gyp:base_junit_test_support', - ], - 'variables': { - 'main_class': 'org.chromium.testing.local.JunitTestMain', - 'src_paths': [ - 'examples/androidjunit/', - ], - 'test_type': 'junit', - 'wrapper_script_name': 'helper/<(_target_name)', - }, - 'includes': [ - '../build/host_jar.gypi', - '../build/android/test_runner.gypi', - ], - }, ], # targets }], # OS=="android" ],