envoy-mobile icon indicating copy to clipboard operation
envoy-mobile copied to clipboard

tests: make envoy_mobile_android_test macro work with kt files

Open Augustyniak opened this issue 3 years ago • 2 comments

Description: Add support for Kotlin robolectric tests by making envoy_mobile_android_test macro use kt_android_local_test maco as opposed to android_local_test macro as the former supports both Java and Kotlin files while the latter supports Java files only. The change should be additive when it comes to functionality. Risk Level: None Testing: Existing tests using envoy_mobile_android_test macro. Docs Changes: N/A Release Notes: N/A

Signed-off-by: Rafal Augustyniak [email protected]

Augustyniak avatar Jul 20 '22 12:07 Augustyniak

@Bencodes any idea as to why our java mac tests are failing after a move from android_local_test to kt_android_local_test? I thought that the transition from android_local_test to kt_android_local_test was supposed to be effortless but maybe we are running into some kind of a (known?) corner case. The logs for failing tests are available at https://github.com/envoyproxy/envoy-mobile/runs/7429257263?check_suite_focus=true

Augustyniak avatar Aug 03 '22 15:08 Augustyniak

So I think that with https://github.com/envoyproxy/envoy-mobile/pull/2436/commits/54ecace49b7b67babe948f4322a71ba6dfb99e29 I was finally able to figure out what the issue with failing android_tests / java_tests_mac (pull_request) CI Job is. We currently pass exec_properties parameter to android_local_test macro and that parameter is not supported by kt_android_local_test which simply ignores it.

https://github.com/envoyproxy/envoy-mobile/blob/308f15cee1a132ab1341476ff5f553065bb416d8/test/common/integration/BUILD#L15-L18

Working on adding support for exec_properties to kt_android_local_test in https://github.com/bazelbuild/rules_kotlin/pull/810.

Augustyniak avatar Aug 03 '22 23:08 Augustyniak