From 83bc878a9182e4f35a7cdeda2401b18e38e0bbd6 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Fri, 2 Aug 2019 17:10:36 -0700 Subject: [PATCH] Allow running Java tests on a non-debug Android variant. --- testing/run_tests.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index e8fd50a2cc94f..28272b8829790 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -216,11 +216,8 @@ def EnsureJavaTestsAreBuilt(android_out_dir): subprocess.check_call(gn_command, cwd=buildroot_dir) subprocess.check_call(ninja_command, cwd=buildroot_dir) -def RunJavaTests(filter): - # There's no real reason why other Android build types couldn't be supported - # here. Could default to this but use any other variant of android_ if it - # exists, but it seems like overkill to add that logic in right now. - android_out_dir = os.path.join(out_dir, 'android_debug_unopt') +def RunJavaTests(filter, android_build_variant): + android_out_dir = os.path.join(out_dir, android_build_variant) EnsureJavaTestsAreBuilt(android_out_dir) robolectric_dir = os.path.join(buildroot_dir, 'third_party', 'robolectric', 'lib') @@ -300,7 +297,7 @@ def main(): if ',' in java_filter or '*' in java_filter: print('Can only filter JUnit4 tests by single entire class name, eg "io.flutter.SmokeTest". Ignoring filter=' + java_filter) java_filter = None - RunJavaTests(java_filter) + RunJavaTests(java_filter, args.variant) # https://github.com/flutter/flutter/issues/36300 if 'benchmarks' in types and not IsWindows():