The test name defaulting to ctx.ModuleName() was
accidentally removed, readd it
Bug: 184895128
Fixes: 264423240
Fixes: 264433459
Test: Verified ninja files produced with this cl and aosp/2372150 are the same as with aosp/2372150 reverted
Change-Id: I23ab8ab39132b93719cc6f797d92b1cabce5eae9
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I50d4ad139322e9e207202f1e1a50f5bbb424aa6f
This reverts commit 8ec823cba1.
Reason for revert: DroidMonitor: Potential culprit for Bug b/262965953 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I236cc36981d8b30527ca286632727f8ca267e969
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620
This commit adds support for a java_host_test that requires a target
binary to run. If the binary has host and target variants and is added
as a dependency in the `data` attribute, then the host variant is used.
Instead, we need a way to force the use of the target variant.
Bug: 182919153
Test: add code from aosp/1647282/1 && atest AuthFsHostTest
Change-Id: I68a6259b41a5e6809e1b82eec3122ffdf5067f56
Adds the require_root property to rust_test modules so that tests can
run as root. Also adds an install base to allow vendor tests to install
to a different path, otherwise installs to 'unrestricted' like cc_test.
Bug: 200602232
Test: test with require_root: true runs as root
Test: test installed to new base directory
Change-Id: Ifa716871ff87471f0c0caff7af558d47db85ccd1
Automatically generate required tradefed configs for rust benchmarks so
that they're available in atest.
Test: atest <module with rust_benchmark defined>
Bug: 155309706
Change-Id: I6002100367a66b6b0555614acc6cebb00dbf435d
Set the TEST_ROOT to /data/local/tmp/tests/vendor if LOCAL_VENDOR_MODULE or
LOCAL_USE_VNDK be set, if not, set to /data/local/tmp.
Bug: 138450837
Test: atest binderVendorDoubleLoadTest
Change-Id: I04acf12976dd24b9bf880a6775fa4f043a221001
Package a slightly modified copy of the robolectric tests with
the dependencies statically included into the testcases directory
and into a robolectric-tests.zip.
Test: m robolectric-tests
Change-Id: I73f51727695136d2a849d36af1683e93f7e156a3
c5b8749853 broke specifying a name via the
`autogenTemplateWithName` function by hard-coding
`ctx.ModuleName()`. This restores that functionality.
Bug: 158784626
Test: atest rustBinderTest_integration
Change-Id: I05674e85defb363aa3cdf3e2dd895d1174e6b48f
This changes the way the output filename is calculated for rust_test
binaries to be more similar to cc_test.
This also removes the option to define multiple test binaries in a
single rust_test module via the TestPerSrc mutator. Now each rust_test
module corresponds to a single test binary.
Bug: 158500462
Test: m -j pin-utils_tests_pin_utils
Test: m -j unicode-xid_device_tests_unicode_xid
Change-Id: I6e0f79dcb4e49fa49d6ebb36abeef67a9eb180a0
Supports the following properties:
- Require_root
- Test_config_template
- Auto_gen_config
Test config template is in a separate CL.
Bug: 148805488
Bug: 151761373
Test: make
Test: unit tests
Test: verified with bc_test & toybox-tests
Change-Id: I63d60a153a6abda4ce30b74d3eb915fbf6389cb8
To support parameterized mainline modules in Test Mapping, we plan to
add a new parameter called test_mainline_modules in build system to
auto-generate the test config based on the parameter.
For detailed information: go/test-mapping-mainline-gcl
(search for auto-generated pattern)
Bug: 155238134
Test: add "test_mainline_modules: [some.apk]" to TetheringTests,
and build the modules, confirm the parameterized option is added
in the test config.
Change-Id: I41ba8749ce46da62db402a8b8a555d4874e1cfc0
To support parameterized mainline modules in Test Mapping, we plan to
add a new parameter called test_mainline_modules in build system to
auto-generate the test config based on the parameter.
For detailed information: go/test-mapping-mainline-gcl
(serach for auto-generated pattern)
Bug: 155238134
Test: add "test_mainline_modules: [some.apk]" to libstatspull_test,
and build the modules, confirm the parameterized option is added
in the test config.
Change-Id: I31d6dfbb71881d7a7026cf2f36ba6ca6a97870ad
Currently, soong will not autogenerate AndroidTest.xml files for
CTS tests. The comment says that this is because they can be used
for test data (in which case, autogenerating an AndroidTest.xml
file would not be correct).
Allow autogeneration of test files in the case that the buid rule
explicitly requests it using a test_config_template. This allows
CTS tests to use test_config_template.
Also remove a TODO that was already addressed by aosp/903934.
Test: patching aosp/1235232 and running "m CtsNetTestCases" results in test config
Change-Id: Ic3450b67c47745af5932edd82452fdf16d937ea7
* The RustBinaryTest runner and device test config template
are derived from GTest. Device tests are pushed to /data/local/tmp.
Bug: 140938178
Test: make unicode-xid projects; run atest
Change-Id: Idb4cab7872b48c6e25bc59b85aa6d9dece4383ec
* Rename testBinaryDecorator to testDecorator
* Add TestProperties
* Add install function for testDecorator to install config files
* Add tradefed.AutoGenRustHostTestConfig
* Depend on new build/make/core/rust_host_test_config_template.xml
and new tradefed.testtype.rust.RustBinaryHostTest class
* Add autogenTemplateWithName in tradefed/autogen.go
to generate config files with customized(mutated) executable name.
* Make rust_test module names more robust and easy to use.
* Use crate name instead of source file name as the Stem
for single source file modules, to match original user
specified output file name in Cargo.toml.
* Do not set up test module SubName when Stem is empty
or when the module name already contains Stem suffix.
That happens when TestPerSrcMutator is disabled or when
there is only one source file with renamed output file name.
* In TEST_MAPPING, references to mutated rust_test modules should be
(1) <module_name> for single source file modules without mutation, or
(2) <module_name>_<crate_name> for single source file modules, or
(3) <module_name>_<source_file_base_name> for multi-file modules.
Bug: 140938178
Test: mm in rust projects, check output test file names
Change-Id: Ifdbfa14d5eed4f10b4fb983f82c93bbb9be3f899
Attribute `auto_gen_config` is added to test modules.
Test config will be generated if:
the attribute is not set and AndroidTest.xml doesn't exists
or
the attribute is set to true, whether or not AndroidTest.xml exists.
Test config will NOT be auto-generated if:
the attribute is not set and AndroidTest.xml exists
or
the attribute is set to false, whether or not AndroidTest.xml exists.
Bug: 141684102
Test: build test module with auto_gen_config set to true
Change-Id: I64fb003a83d8c32a967835e5f8d12fe4476043be
The new option will allow the auto-generated test config for cc_test to
include MinApiLevelModuleController and check the api-level before test.
Bug: 140912549
Test: 1. $vi platform_testing/tests/example/native/Android.bp
2. add
test_min_api_level: 29,
or
test_min_sdk_version: 29,
3. $m -j hello_world_test
4. check hello_world_test.config
Change-Id: Ic742d41898928df1637890bec87796d90e886516
The new option will allow the auto-generated test config for cc_test to
include RunCommandTargetPreparer to disable framework before the test
run and re-enable it after the test run.
Bug: 140065309
Test: test hello_world_test with the new option.
Change-Id: If2189e9474f5b11bd0d0471e231a2cae14155389
require_root is added to allow auto-generated test config to include
RootTargetPreparer so the test runs with root permission.
Bug: 134509111
Test: add "require_root: true" to init_benchmarks and libpower_test
build the modules, confirm the extra target preparer is added in the
test configs.
Change-Id: Ia07503e338935d6aa92560e7cf7b18d2a4c51243
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings. Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.
Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
If an Android.bp specifies Isolated=true, make sure
it's tagged as not-shardable, since b/126376458 is not
resolved.
Test: make bionic-benchmarks-tests (with and without isolated=true)
Bug: 124024827
Change-Id: I2210c15b84f9b30e1cc23b426d463b34cf9ef94f
Current soong use source code's under cts as the rule for judgement.
Should change to use test_suites define instead.
Bug: 124313692
Test: m hello_world_test, make sure test config be auog-enerated.
Modified platform_testing/tests/example/native/Android.bp
m hello_world_test, make sure test config not be auto-generatetd.
Change-Id: I1bc5216f73329d2a82d9ff29ccbede436dd2976c
This reverts commit d30b940dff.
Reason for revert: sed -i requires an argument on mac, break build on mac.
Change-Id: Iba2db061ae888d265e02b750e50959019cf0f168
* Allow module owner to specify a test_config_template in Android.bp
* The rule goes:
1. When "test_config" is set, Soong uses specified test config
2. If 1 is not true, check if "AndroidTest.xml" exist in the
directory, if so, use "AndroidTest.xml
3. If 1 and 2 are not true, check if "test_config_template" is set.
If so, use module specific template to generate test config
4. Otherwise, use Soong default template for test config for autogen
Bug: 113359343
Test: make
Change-Id: I9fb4b2b266be9e0c7cf23da4a51e1c8ae67cd857
Move autogenerating the test config for Soong modules into Soong
for java_test and android_test modules.
Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Change-Id: I02593add0407ef694b91c14cf27411a4f3cc4745