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

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

Merge "ATest: GTest auto gen config support run-test-as."

parents 70b26e5c fab820c5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -34,9 +34,16 @@ else
endif
# Auto generating test config file for native test
$(autogen_test_config_file): PRIVATE_MODULE_NAME := $(LOCAL_MODULE)
$(autogen_test_config_file): PRIVATE_RUN_UID := $(LOCAL_RUN_TEST_AS)
$(autogen_test_config_file) : $(autogen_test_config_template)
	@echo "Auto generating test config $(notdir $@)"
	$(hide) sed 's&{MODULE}&$(PRIVATE_MODULE_NAME)&g' $< > $@
ifneq ($(LOCAL_RUN_TEST_AS),)
	$(hide) sed -i 's&{UID_OPTION}&<option name="run-test-as" value="$(PRIVATE_RUN_UID)" />&g' $@
else
	$(hide) sed -i '/{UID_OPTION}/d' $@
endif

my_auto_generate_config := true
else
# Auto generating test config file for instrumentation test
+1 −0
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@ LOCAL_RESOURCE_DIR:=
LOCAL_RMTYPEDEFS:=
LOCAL_RRO_THEME:=
LOCAL_RTTI_FLAG:=
LOCAL_RUN_TEST_AS :=
LOCAL_SANITIZE:=
LOCAL_SANITIZE_DIAG:=
LOCAL_SANITIZE_RECOVER:=
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
    </target_preparer>

    <test class="com.android.tradefed.testtype.GTest" >
        {UID_OPTION}
        <option name="native-test-device-path" value="/data/local/tmp" />
        <option name="module-name" value="{MODULE}" />
    </test>