diff --git a/webrtc/examples/androidjunit/README b/webrtc/examples/androidjunit/README new file mode 100644 index 0000000000..502d71460f --- /dev/null +++ b/webrtc/examples/androidjunit/README @@ -0,0 +1,8 @@ +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 + +To run: +out/Debug/bin/run_AppRTCDemoJUnitTest diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp index 9ef10cebf6..6f07b4d7fe 100755 --- a/webrtc/webrtc_examples.gyp +++ b/webrtc/webrtc_examples.gyp @@ -464,6 +464,29 @@ '../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" ],