Commit graph

13 commits

Author SHA1 Message Date
Colin Cross
b63d7b3af7 Remove infrastructure to run bp2build
Bug: 315353489
Test: m blueprint_tests
Change-Id: Idcf6377d389b94c39e4e6ff4b8efa8a9f9e78b17
2023-12-08 13:51:07 -08:00
Cole Faust
fb11c1ce81 Add ConvertApexAvailableToTags
This is a more flexible version of ApexAvailableTags
that can be used for the aidl modules.

Bug: 260694842
Test: go test
Change-Id: Iddb15e737c19e95977f74e8c627d6044d8875746
2023-02-13 10:23:36 -08:00
Paul Duffin
30ac3e7ca7 Remove uses of FixtureFactory from android package
Bug: 183235980
Test: m nothing
Change-Id: I72898ada020ee1a73fd534c61afb5c22fa00c1e5
2021-03-22 18:31:53 +00:00
Paul Duffin
e8a4ac49fe Convert android/mutator_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: Id7eb915af21ccde5acf1d4a0ec339e0672bc3d57
2021-03-18 12:17:05 +00:00
Colin Cross
ae8600b507 Pass Config to NewTestContext instead of ctx.Register
Prepare for using Config when adding singletons by passing
Config to NewTestContext and NewContext instead of to ctx.Register.
This will enable a followup change to store SingletonMakeVarsProviders
registered on the Context in the Config, which is necessary to run
multiple tests in parallel without data races.

Test: all soong tests
Change-Id: Id229629a4e42ff4487d317241673837726c075fc
2020-11-12 10:07:49 -08:00
Colin Cross
405af07859 Revert "Make lots of tests run in parallel"
This reverts commit 323dc60712.

Reason for revert: Possible cause of test instability
Bug: 170513220
Test: soong tests

Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-09 18:34:24 -07:00
Colin Cross
323dc60712 Make lots of tests run in parallel
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.

Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-10-06 15:12:22 -07:00
Martin Stjernholm
710ec3aef2 Add FinalDeps mutator phase, where CreateVariations is disallowed.
This is for use to add dependencies between specific module variants,
without getting the dependencies potentially duplicated as more
variants are created.

Moved genrule tool dependency registration to this phase, to avoid
potential splitting of its dependencies, and for consistency with the
same kind of dependency on dex2oat in https://r.android.com/1205730.

Test: m nothing
Bug: 145934348
Change-Id: I1f9e75354e359cef5f41d14e5016b0a67d7655d7
2020-01-21 11:40:02 +00:00
Colin Cross
98be1bb00f Move filesystem into Config
The filesystem object was available through ModuleContext.Fs(), but
gives too much access to the filesystem without enforicing correct
dependencies.  In order to support sandboxing the soong_build
process move the filesystem into the Config.  The next change will
make it private.

Bug: 146437378
Test: all Soong tests
Change-Id: I5d3ae9108f120fd335b21efd612aefa078378813
2019-12-18 08:19:10 -08:00
Colin Cross
4b49b768a2 Make TestContext.RegisterModuleType take an android.ModuleFactory
Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.

Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
2019-11-25 10:59:44 -08:00
Colin Cross
9a36223d59 Add a String() method to android.Module
Add a String() method to android.Module for use in debugging.  Store
the name and variations of the module as they are mutated.

Test: TestModuleString
Bug: 136473661
Change-Id: I74e393703dcfc96ed4e21ac4a4419a7858b59216
2019-07-03 15:37:11 -07:00
Colin Cross
fa07821d88 Remove ioutil.TempDir from each android/soong/android test
android_test.go already sets up a global buildDir, no need to create
one in each test.

Test: All soong tests
Change-Id: Ib85cbf78c604ad3cef64aa00b6bd812a81496e9e
2019-07-03 20:27:11 +00:00
Colin Cross
dc35e21124 Consolidate *MutatorContext and ModuleContext into BaseModuleContext
Following 99bdb2ab4fd5168a71a20aecf10611425be47ec4 in build/blueprint,
move more methods into BaseModuleContext.

This reapplies I9f8df94f1ae2b55d3cccf7b9468247f3e7cb2ebd after fixing
missing errors thrown for missing defaults modules when
AllowMissingDependencies == true.

Test: m checkbuild
Test: defaults_test.go
Change-Id: Ia17b2bcbf2bac6889c419b2e73953946f6aa40ad
2019-06-10 16:30:35 -07:00