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

Commit fa20e4b5 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Clean up Ravenood test config xml template

- Also support "tradefed_options" and "test_runner_options" in
  android_ravenwood_test

Bug: 292141694
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s
Flag: EXEMPT host test change only
Change-Id: If20eebb56c70ff662739e48676ebe67c85ff867f
parent b5c8cda6
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -29,6 +29,23 @@ java_defaults {
        "test/**/*.kt",
    ],
    data: ["data/**/*"],
    test_options: {
        // This is injected outside of the <test> element.
        tradefed_options: [
            {
                name: "java-flags",
                value: "-Dxxx-extra-tradefed-option=value1",
            },
        ],

        // This is injected inside the <test> element.
        test_runner_options: [
            {
                name: "java-flags",
                value: "-Dxxx-extra-runner-option=value2",
            },
        ],
    },
    ravenizer: {
        strip_mockito: true,
    },
+7 −0
Original line number Diff line number Diff line
@@ -39,4 +39,11 @@ public class RavenwoodCoreBasicTest {
        assertEquals("datafile2", readFile("data/datafile2.txt"));
        assertEquals("morefile", readFile("data/subdir/morefile.txt"));
    }

    @Test
    public void testTestConfig() throws Exception {
        // These properties are injected via the Android.bp, using the -D java option.
        assertEquals("value1", System.getProperty("xxx-extra-tradefed-option"));
        assertEquals("value2", System.getProperty("xxx-extra-runner-option"));
    }
}