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

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

Merge "Convert `aapt2_run_host_unit_tests` to Android.bp" into main

parents 6b28a227 08b87e4c
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -236,3 +236,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"],
}
+1 −19
Original line number Diff line number Diff line
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))