Skip to content
Snippets Groups Projects
Commit f73c4e37 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Convert `aapt2_run_host_unit_tests` to Android.bp" into main am: ab3903da am: 88e05b4e

parents 63405659 88e05b4e
No related branches found
No related tags found
No related merge requests found
......@@ -232,3 +232,39 @@ genrule {
],
},
}
cc_genrule {
name: "aapt2_results",
srcs: [
":aapt2_tests",
"integration-tests/CompileTest/**/*",
"integration-tests/CommandTests/**/*",
"integration-tests/ConvertTest/**/*",
"integration-tests/DumpTest/**/*",
],
host_supported: true,
device_supported: false,
target: {
windows: {
compile_multilib: "64",
},
},
out: ["result.xml"],
cmd: "mkdir -p $(genDir)/integration-tests/CompileTest/ && " +
"cp $(locations integration-tests/CompileTest/**/*) $(genDir)/integration-tests/CompileTest/ && " +
"mkdir -p $(genDir)/integration-tests/CommandTests/ && " +
"cp $(locations integration-tests/CommandTests/**/*) $(genDir)/integration-tests/CompileTest/ && " +
"mkdir -p $(genDir)/integration-tests/ConvertTest/ && " +
"cp $(locations integration-tests/ConvertTest/**/*) $(genDir)/integration-tests/ConvertTest/ && " +
"mkdir -p $(genDir)/integration-tests/DumpTest/ && " +
"cp $(locations integration-tests/DumpTest/**/*) $(genDir)/integration-tests/DumpTest/ && " +
"cp $(locations :aapt2_tests) $(genDir)/ && " +
"$(genDir)/aapt2_tests " +
"--gtest_output=xml:$(out) " +
">/dev/null 2>&1 ; true",
}
phony_rule {
name: "aapt2_run_host_unit_tests",
phony_deps: ["aapt2_results"],
}
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
aapt2_results := $(call intermediates-dir-for,PACKAGING,aapt2_run_host_unit_tests)/result.xml
# Target for running host unit tests on post/pre-submit.
.PHONY: aapt2_run_host_unit_tests
aapt2_run_host_unit_tests: $(aapt2_results)
$(call dist-for-goals,aapt2_run_host_unit_tests,$(aapt2_results):gtest/aapt2_host_unit_tests_result.xml)
# Always run the tests again, even if they haven't changed
$(aapt2_results): .KATI_IMPLICIT_OUTPUTS := $(aapt2_results)-nocache
$(aapt2_results): $(HOST_OUT_NATIVE_TESTS)/aapt2_tests/aapt2_tests
-$(HOST_OUT_NATIVE_TESTS)/aapt2_tests/aapt2_tests --gtest_output=xml:$@ > /dev/null 2>&1
aapt2_results := ./out/soong/.intermediates/frameworks/base/tools/aapt2/aapt2_results
$(call declare-1p-target,$(aapt2_results))
aapt2_results :=
include $(call all-makefiles-under,$(LOCAL_PATH))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment