platform_build_soong/tradefed
Ronald Braunstein 1a6e7c032a Add test_module_config_host
This pairs with `test_module_config` but also works on the base is a
`java_test_host` module.
e.g.

	test_module_config_host {
	     name: "CtsOsHostTestCases_DERIVED_2566",
	     base: "CtsOsHostTestCases",
	     test_suites: ["general-tests"],
	     include_filters: [ "android.os.cts.StaticSharedLibsHostTests" ],
	     exclude_annotations: [ "androidx.test.filters.FlakyTest","org.junit.Ignore" ],
	}

The new module is composed of the previous and shares much of the same
code.

With respect to build size,
	Without this change, if you build CtsAppSecurityHostTestCases, there
	will be several copies of the jar (and related apks) :
	 *) 1 in framework
	     out/host/linux-x86/framework/CtsAppSecurityHostTestCases.jar
	 *) 1 in testcases for the test
	     out/host/linux-x86/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
	 *) 1 per compatibility suite testcases
		out/host/linux-x86/mts-documentsui/android-mts-documentsui/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts-mediaprovider/android-mts-mediaprovider/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts/android-mts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/cts/android-cts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts-mainline-infra/android-mts-mainline-infra/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar

	A dervived test using CtsAppSecurityHostTestCases as base adds one more
	to its testcases dir:
	  *) derived testcase.
	     out/host/linux-x86/testcases/CtsAppSecurityHostTestCases_presubmit_ExternalStorageApp/CtsAppSecurityHostTestCases.jar

Fixes: b/327280990
Test: m clean && m  CtsOsHostTestCases_DERIVED_2566# as above
Test: atest CtsOsHostTestCases_DERIVED_2566 --collect-tests-only
Test: migrated the 71 TestMapping instances to Android.bp and build them.
  Ran tests on some of them.
  Ran some original `test_module_config` tests derived from `android_test` as well

TODO: Add actions to validate the given filters are valid for the given
test apks/jars.

Change-Id: I115eedb6ff6ba8e72bb49e71867daf49d25ca0f1
2024-03-28 15:07:17 -07:00
..
suite_harness Enable Soong's tradefed_binary to support multi-arch 2023-12-13 02:53:22 +00:00
Android.bp Test_Module_Config soong implementation 2024-03-06 00:38:56 +00:00
autogen.go Remove unnecessary variable 2023-06-15 23:22:39 +00:00
config.go Add android_ravenwood_test build rule 2024-02-08 09:25:35 -08:00
makevars.go Attach rust_benchmark to atest and tradefed. 2021-04-06 12:40:34 +02:00
providers.go Add test_module_config_host 2024-03-28 15:07:17 -07:00