diff options
author | ronshapiro <ronshapiro@google.com> | 2018-09-06 08:49:45 -0700 |
---|---|---|
committer | Ron Shapiro <shapiro.rd@gmail.com> | 2018-09-12 11:15:55 -0400 |
commit | 3f6eb48b570ed530d70b2cdd28b47cd503d855d8 (patch) | |
tree | 73e0611e62bbb991e83151672311c101093d799e /test_defs.bzl | |
parent | d6a0db34dd2972a3fc42ca011e229a827fa8c106 (diff) | |
download | dagger2-3f6eb48b570ed530d70b2cdd28b47cd503d855d8.tar.gz |
Migrate to android_local_test
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211814342
Diffstat (limited to 'test_defs.bzl')
-rw-r--r-- | test_defs.bzl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/test_defs.bzl b/test_defs.bzl index 1b8f1d137..db13354e4 100644 --- a/test_defs.bzl +++ b/test_defs.bzl @@ -59,9 +59,13 @@ def GenRobolectricTests( plugins = None, javacopts = None, lib_javacopts = None, - test_javacopts = None): - # TODO(ronshapiro): enable these when Bazel supports robolectric tests - pass + test_javacopts = None, + manifest_values = None): + # TODO(ronshapiro): enable these with these instructions: + # https://docs.bazel.build/versions/master/be/android.html#android_local_test_examples + # We probably want to import all of Robolectric's dependencies into bazel-common because there + # are some differences (i.e. we both provide Guava). + pass def _GenTests( library_rule_type, @@ -74,7 +78,8 @@ def _GenTests( javacopts = None, lib_javacopts = None, test_javacopts = None, - functional = True): + functional = True, + test_kwargs = {}): _gen_tests( library_rule_type, test_rule_type, @@ -86,6 +91,7 @@ def _GenTests( javacopts, lib_javacopts, test_javacopts, + test_kwargs = test_kwargs, ) if functional: @@ -103,6 +109,7 @@ def _GenTests( lib_javacopts, test_javacopts, variant_name, + test_kwargs = test_kwargs, ) def _gen_tests( @@ -116,7 +123,8 @@ def _gen_tests( javacopts, lib_javacopts, test_javacopts, - variant_name = None): + variant_name = None, + test_kwargs = {}): if variant_name: suffix = "_" + variant_name tags = [variant_name] @@ -170,4 +178,5 @@ def _gen_tests( tags = tags, test_class = test_class, deps = test_deps, + **test_kwargs ) |