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
diff --git a/core/base_rules.mk b/core/base_rules.mk
index f78e509..1d1c114 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.
@@ -757,6 +758,7 @@
   $(eval my_compat_dist_config_$(suite) := ) \
   $(eval my_compat_dist_test_data_$(suite) := ))
 
+endif  # LOCAL_UNINSTALLABLE_MODULE
 endif  # LOCAL_COMPATIBILITY_SUITE
 
 ###########################################################