Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d07fbb0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "atest_java_test"

* changes:
  Track more static dependencies for notice files
  Allow Soong to autogenerate test configs
parents 56d08ec8 579668b1
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -583,10 +583,12 @@ else
      $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \
      $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
        $(s):$(dir)/$(n)))))
  ifeq (,$(LOCAL_TEST_CONFIG))
    test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml)
  else
  ifneq (,$(LOCAL_FULL_TEST_CONFIG))
    test_config := $(LOCAL_FULL_TEST_CONFIG)
  else ifneq (,$(LOCAL_TEST_CONFIG))
    test_config := $(LOCAL_PATH)/$(LOCAL_TEST_CONFIG)
  else
    test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml)
  endif
  ifeq (,$(test_config))
    ifneq (true,$(is_native))
@@ -639,6 +641,19 @@ else
  endif
endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files

# HACK: pretend a soong LOCAL_FULL_TEST_CONFIG is autogenerated by copying it to
# the location autogenerated test configs use and setting the flag in
# module-info.json
ifdef LOCAL_FULL_TEST_CONFIG
  ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
    my_test_config_file := $(dir $(LOCAL_BUILT_MODULE))$(LOCAL_MODULE).config
    $(eval $(call copy-one-file,$(LOCAL_FULL_TEST_CONFIG),$(my_test_config_file)))
    $(call add-dependency,$(LOCAL_BUILT_MODULE),$(my_test_config_file))
    ALL_MODULES.$(my_register_name).auto_test_config := true
    my_test_config_file :=
  endif
endif

ifneq ($(my_test_data_file_pairs),)
$(foreach pair, $(my_test_data_file_pairs), \
  $(eval parts := $(subst :,$(space),$(pair))) \
+3 −5
Original line number Diff line number Diff line
@@ -1608,6 +1608,9 @@ else
installed_static_library_notice_file_targets :=
endif

$(notice_target): | $(installed_static_library_notice_file_targets)
$(LOCAL_INSTALLED_MODULE): | $(notice_target)

# Default is -fno-rtti.
ifeq ($(strip $(LOCAL_RTTI_FLAG)),)
LOCAL_RTTI_FLAG := -fno-rtti
@@ -1813,11 +1816,6 @@ all_libraries := \
    $(built_static_libraries) \
    $(built_whole_libraries)

# Also depend on the notice files for any static libraries that
# are linked into this module.  This will force them to be installed
# when this module is.
$(LOCAL_INSTALLED_MODULE): | $(installed_static_library_notice_file_targets)

###########################################################
# Export includes
###########################################################
+3 −2
Original line number Diff line number Diff line
@@ -94,10 +94,11 @@ LOCAL_EXTRACT_DPI_APK:=
LOCAL_FDO_SUPPORT:=
LOCAL_FINDBUGS_FLAGS:=
LOCAL_FORCE_STATIC_EXECUTABLE:=
LOCAL_FULL_LIBS_MANIFEST_FILES:=
LOCAL_FULL_MANIFEST_FILE:=
LOCAL_FULL_CLASSES_JACOCO_JAR:=
LOCAL_FULL_CLASSES_PRE_JACOCO_JAR:=
LOCAL_FULL_LIBS_MANIFEST_FILES:=
LOCAL_FULL_MANIFEST_FILE:=
LOCAL_FULL_TEST_CONFIG:=
LOCAL_FUZZ_ENGINE:=
LOCAL_GCNO_FILES:=
LOCAL_GENERATED_SOURCES:=
+0 −9
Original line number Diff line number Diff line
@@ -167,15 +167,6 @@ BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java
BUILD_HOST_TEST_CONFIG := $(BUILD_SYSTEM)/host_test_config.mk
BUILD_TARGET_TEST_CONFIG := $(BUILD_SYSTEM)/target_test_config.mk

INSTRUMENTATION_TEST_CONFIG_TEMPLATE := $(BUILD_SYSTEM)/instrumentation_test_config_template.xml
NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE := $(BUILD_SYSTEM)/native_benchmark_test_config_template.xml
NATIVE_TEST_CONFIG_TEMPLATE := $(BUILD_SYSTEM)/native_test_config_template.xml
EMPTY_TEST_CONFIG := $(BUILD_SYSTEM)/empty_test_config.xml
NATIVE_HOST_TEST_CONFIG_TEMPLATE := $(BUILD_SYSTEM)/native_host_test_config_template.xml

# Tool to generate TradeFed test config file automatically.
AUTOGEN_TEST_CONFIG_SCRIPT := build/make/tools/auto_gen_test_config.py

# ###############################################################
# Parse out any modifier targets.
# ###############################################################
+15 −0
Original line number Diff line number Diff line
@@ -487,6 +487,21 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SHARED_JAVA_HEADER_LIBRARIES := $(full_sh
ALL_MODULES.$(my_register_name).INTERMEDIATE_SOURCE_DIR := \
    $(ALL_MODULES.$(my_register_name).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)


##########################################################
# Copy NOTICE files of transitive static dependencies
# Don't do this in mm, since many of the targets won't exist.
ifeq ($(ONE_SHOT_MAKEFILE),)
installed_static_library_notice_file_targets := \
    $(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
      NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST,TARGET)-JAVA_LIBRARIES-$(lib))
else
installed_static_library_notice_file_targets :=
endif

$(notice_target): | $(installed_static_library_notice_file_targets)
$(LOCAL_INSTALLED_MODULE): | $(notice_target)

###########################################################
# Verify that all libraries are safe to use
###########################################################
Loading