Don't install test suite files from uninstallable modules

Don't copy tests or test data to the test suite directories if the
module is marked LOCAL_UNINSTALLABLE_MODULE := true.

Fixes: 153758132
Test: m checkbuild
Change-Id: Ibdf18807a2ffe9bb352d74880a802ad55b57f154
Merged-In: Ibdf18807a2ffe9bb352d74880a802ad55b57f154
(cherry picked from commit fca369e4e3694b0f549613362f056ffff8c88f67)
diff --git a/core/base_rules.mk b/core/base_rules.mk
index b7e3da7..1db73ae 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -597,6 +597,7 @@
 ## Compatibility suite files.
 ###########################################################
 ifdef LOCAL_COMPATIBILITY_SUITE
+ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
 
 # If we are building a native test or benchmark and its stem variants are not defined,
 # separate the multiple architectures into subdirectories of the testcase folder.
@@ -750,6 +751,7 @@
 $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
   $(eval my_compat_dist_config_$(suite) := ))
 
+endif  # LOCAL_UNINSTALLABLE_MODULE
 endif  # LOCAL_COMPATIBILITY_SUITE
 
 ###########################################################