ANDROID: Add packaging rules for KUnit test modules.

Include KUnit modules and test configuration inside `tests.zip` alongside the kselftest tests.

Bug: 311187098
Change-Id: Ic82cd8611d0761435a45c8e82c7d10a009d01a73
Signed-off-by: Joe Fradley <joefradley@google.com>
This commit is contained in:
Joe Fradley
2023-11-20 08:44:17 -08:00
parent 50a656aa37
commit df94db3dda
3 changed files with 130 additions and 5 deletions
@@ -0,0 +1,33 @@
<configuration description="kunit">
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push-file" key="kunit" value="/data/kunit" />
</target_preparer>
<result_reporter class="com.android.tradefed.result.ConsoleResultReporter" />
<!-- Modules that leave the OS in an unstable state have been temporarily commented out. -->
<test class="com.android.tradefed.testtype.binary.KUnitModuleTest" >
<!-- <option name='binary' key='drivers/base/regmap/regmap-kunit' value='/data/kunit/arm64/drivers/base/regmap/regmap-kunit.ko' /> -->
<option name='binary' key='drivers/base/regmap/regmap-ram' value='/data/kunit/arm64/drivers/base/regmap/regmap-ram.ko' />
<option name='binary' key='drivers/base/regmap/regmap-raw-ram' value='/data/kunit/arm64/drivers/base/regmap/regmap-raw-ram.ko' />
<option name='binary' key='drivers/hid/hid-uclogic-test' value='/data/kunit/arm64/drivers/hid/hid-uclogic-test.ko' />
<!-- <option name='binary' key='drivers/iio/test/iio-test-format' value='/data/kunit/arm64/drivers/iio/test/iio-test-format.ko' /> -->
<option name='binary' key='drivers/input/tests/input_test' value='/data/kunit/arm64/drivers/input/tests/input_test.ko' />
<option name='binary' key='drivers/rtc/lib_test' value='/data/kunit/arm64/drivers/rtc/lib_test.ko' />
<option name='binary' key='fs/ext4/ext4-inode-test' value='/data/kunit/arm64/fs/ext4/ext4-inode-test.ko' />
<option name='binary' key='fs/fat/fat_test' value='/data/kunit/arm64/fs/fat/fat_test.ko' />
<option name='binary' key='kernel/time/time_test' value='/data/kunit/arm64/kernel/time/time_test.ko' />
<option name='binary' key='lib/kunit/kunit-example-test' value='/data/kunit/arm64/lib/kunit/kunit-example-test.ko' />
<!-- <option name='binary' key='lib/kunit/kunit-test' value='/data/kunit/arm64/lib/kunit/kunit-test.ko' /> -->
<!-- <option name='binary' key='mm/kfence/kfence_test' value='/data/kunit/arm64/mm/kfence/kfence_test.ko' /> -->
<option name='binary' key='net/core/dev_addr_lists_test' value='/data/kunit/arm64/net/core/dev_addr_lists_test.ko' />
<!-- <option name='binary' key='sound/soc/soc-topology-test' value='/data/kunit/arm64/sound/soc/soc-topology-test.ko' /> -->
<option name='binary' key='sound/soc/soc-utils-test' value='/data/kunit/arm64/sound/soc/soc-utils-test.ko' />
<option name='binary' key='drivers/clk/clk-gate_test' value='/data/kunit/arm64/drivers/clk/clk-gate_test.ko' />
<option name='binary' key='drivers/clk/clk_test' value='/data/kunit/arm64/drivers/clk/clk_test.ko' />
</test>
</configuration>
@@ -0,0 +1,30 @@
<configuration description="kunit">
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push-file" key="kunit" value="/data/kunit" />
</target_preparer>
<result_reporter class="com.android.tradefed.result.ConsoleResultReporter" />
<!-- Modules that leave the OS in an unstable state have been temporarily commented out. -->
<test class="com.android.tradefed.testtype.binary.KUnitModuleTest" >
<!-- <option name='binary' key='drivers/base/regmap/regmap-kunit' value='/data/kunit/x86_64/drivers/base/regmap/regmap-kunit.ko' /> -->
<option name='binary' key='drivers/base/regmap/regmap-ram' value='/data/kunit/x86_64/drivers/base/regmap/regmap-ram.ko' />
<option name='binary' key='drivers/base/regmap/regmap-raw-ram' value='/data/kunit/x86_64/drivers/base/regmap/regmap-raw-ram.ko' />
<option name='binary' key='drivers/hid/hid-uclogic-test' value='/data/kunit/x86_64/drivers/hid/hid-uclogic-test.ko' />
<!-- <option name='binary' key='drivers/iio/test/iio-test-format' value='/data/kunit/x86_64/drivers/iio/test/iio-test-format.ko' /> -->
<option name='binary' key='drivers/input/tests/input_test' value='/data/kunit/x86_64/drivers/input/tests/input_test.ko' />
<option name='binary' key='drivers/rtc/lib_test' value='/data/kunit/x86_64/drivers/rtc/lib_test.ko' />
<option name='binary' key='fs/ext4/ext4-inode-test' value='/data/kunit/x86_64/fs/ext4/ext4-inode-test.ko' />
<option name='binary' key='fs/fat/fat_test' value='/data/kunit/x86_64/fs/fat/fat_test.ko' />
<option name='binary' key='kernel/time/time_test' value='/data/kunit/x86_64/kernel/time/time_test.ko' />
<option name='binary' key='lib/kunit/kunit-example-test' value='/data/kunit/x86_64/lib/kunit/kunit-example-test.ko' />
<!-- <option name='binary' key='lib/kunit/kunit-test' value='/data/kunit/x86_64/lib/kunit/kunit-test.ko' /> -->
<!-- <option name='binary' key='mm/kfence/kfence_test' value='/data/kunit/x86_64/mm/kfence/kfence_test.ko' /> -->
<option name='binary' key='net/core/dev_addr_lists_test' value='/data/kunit/x86_64/net/core/dev_addr_lists_test.ko' />
<!-- <option name='binary' key='sound/soc/soc-topology-test' value='/data/kunit/x86_64/sound/soc/soc-topology-test.ko' /> -->
<option name='binary' key='sound/soc/soc-utils-test' value='/data/kunit/x86_64/sound/soc/soc-utils-test.ko' />
</test>
</configuration>