aboutsummaryrefslogtreecommitdiffstats
path: root/android/namespace_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Move filesystem into ConfigColin Cross2019-12-181-3/+2
| | | | | | | | | | | | 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
* Make TestContext.RegisterModuleType take an android.ModuleFactoryColin Cross2019-11-251-3/+3
| | | | | | | | Avoid having to pass ModuleFactoryAdaptor to every call to RegisterModuleType in a test by wrapping RegisterModuleType. Test: all soong tests Change-Id: If8847d16487de0479cc3020b728256922b3cadba
* Give Blueprint modules access to all namespacesColin Cross2019-06-141-0/+43
| | | | | | | | | | Don't enforce namespaces on Blueprint modules like bootstrap_go_package, their dependencies are handled before namespaces are initialized in namespaceMutator. Fixes: 135246048 Test: TestDependingOnBlueprintModuleInRootNamespace Change-Id: I7cf1c26bb8512eed59d6b4eb42a49f7080ffa281
* Share buildDir for android/soong/android testsColin Cross2019-06-101-8/+0
| | | | | | | | There is no need to create a separate buildDir for each test file, use TestMain to create a global one for the package. Test: all soong tests Change-Id: I435ee7aa88b7e0bb8ccc1ba79f82833a7accf3e9
* Fix module rename inside namespaceColin Cross2018-04-161-2/+36
| | | | | | | | | Rename was expecting fully qualified names, but context.go always passes it short names. Bug: 77922456 Test: TestRename in namespace_test.go Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
* Extract failIfErrored() to android/testing.goLogan Chien2018-03-151-10/+1
| | | | | | Bug: 74506774 Test: lunch aosp_walleye-userdebug && make # runs unit tests Change-Id: I1c09412d5988dca2cc1c5f041893b313ab1c163a
* Move namespace mutator earlier to support defaultsDan Willemsen2018-01-261-1/+1
| | | | | | | | | | The prebuilts and defaults mutators start adding some dependencies, so for them to be able to reference imported modules, we need to run the namespace mutator earlier. Test: m nothing Test: Try to use a global defaults module from a namespace Change-Id: I6e853d20e32251d0fd33c8b2dcc26c0695b808fd
* Make ninja file deterministic even with dup module namesJeff Gaston2017-12-041-0/+20
| | | | | | | | Bug: 65683273 Test: ./build/soong/scripts/diff_build_graphs.sh \ --products=aosp_arm '' '' Change-Id: Ie01ff579d69e94b12363f53aec5d25810211c451
* require namespaces to be declared only in files named Android.bpJeff Gaston2017-12-041-13/+44
| | | | | | | Bug: 65683273 Test: m -j nothing # which runs unit tests Change-Id: I5edf0e0482809f5ac9fb9dfff342fb404e1c52da
* Revert "Revert "Soong support for namespaces""Jeff Gaston2017-12-041-0/+652
| | | | | | | | | | | | | | | | | This mostly reverts commit 178d5fefc0cea9d0f031c0bdee125b9d960f32c3 and mostly reapplies change I6d3e52ef62c4cabe85b9a135a54de0e1a6aab29c . Bug: 65683273 Test: build/soong/scripts/diff_build_graphs.sh \ --products=aosp_arm \ 'build/blueprint:work^ build/soong:work^' \ 'build/blueprint:work build/soong:work' # and see that the only changes were: # 1. adding some new files # 2. changing some line numbers Test: m -j nothing # which runs unit tests Change-Id: I32baae00277a547fdcdd1c2219fe6625ee0e45d7
* Revert "Soong support for namespaces"Jeff Gaston2017-11-301-652/+0
| | | | | | | | | | This reverts commit 63a250a336a1b910836eeb4caebcf5b4f8d91c2a. Reason for revert: Some failures: namespace_test.go:648: dir1/Blueprints:2:4: a namespace must be the first module in the file such as New Build Breakage: aosp-master/build_test @ 4475274 Change-Id: I1b5db8eb934e51ff22241bfca44199d886b1393b
* Soong support for namespacesJeff Gaston2017-11-291-0/+652
Bug: 65683273 Test: build/soong/scripts/diff_build_graphs.sh \ --products=aosp_arm \ 'build/blueprint:work^ build/soong:work^' \ 'build/blueprint:work build/soong:work' # and see that the only changes were: # 1. adding some new files # 2. changing some line numbers Test: m -j nothing # which runs unit tests Change-Id: I6d3e52ef62c4cabe85b9a135a54de0e1a6aab29c