Clean additional Robolectric variable
Add LOCAL_INSTRUMENT_SRCJARS to list of variables
to reset when calling CLEAR_VARS from a makefile.
This fixes an issue when generating JaCoCo coverage
reports for Robolectric tests.
The value from another module would bleed into the current
one causing the wrong source directory to be used during
report creation, which in turn resulted in an empty report.
This would only happen for modules still using 'Android.mk';
when using Android.bp files the value for LOCAL_INSTRUMENT_SRCJARS
is always set from 'robolectric.go'.
Bug: 214588476
Test: m clockwork-frameworks-robotests-jacoco
Change-Id: I7b527c82bdbe4db06acd1a1fa1a2443e64ed703d
(cherry picked from commit cc799bdf9161dc3c0f6eb437ed064f9712bbfd6b)
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 8913ad0..bb7ba1b 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -503,6 +503,7 @@
# Robolectric variables
LOCAL_INSTRUMENT_SOURCE_DIRS :=
+LOCAL_INSTRUMENT_SRCJARS :=
LOCAL_ROBOTEST_FAILURE_FATAL :=
LOCAL_ROBOTEST_FILES :=
LOCAL_ROBOTEST_TIMEOUT :=