summaryrefslogtreecommitdiff
path: root/android/csuite_config_test.go
AgeCommit message (Collapse)Author
2025-02-12Don't panic in ModuleForTests and friends Colin Cross
Panicking in ModuleForTests and similar test helper functions was a mistake. Go's test runner stops running tests as soon as any test panics, which means debugging multiple tests panicking requires rerunning all the tests after fixing each panic to find the next one. Pass the *testing.T into ModuleForTests and friends so that it can call t.Fatalf instead. Test: all soong tests pass Change-Id: I5d0f2424eaf04fb795079e6d1e4b9469d8c7033c
2021-03-22Remove uses of FixtureFactory from android package Paul Duffin
Bug: 183235980 Test: m nothing Change-Id: I72898ada020ee1a73fd534c61afb5c22fa00c1e5
2021-03-17Convert android/csuite_config_test.go to test fixtures Paul Duffin
Bug: 182885307 Test: m nothing Change-Id: Ic3a83b0051553be7dea0284310db6304bb815eb1
2020-11-12Pass Config to NewTestContext instead of ctx.Register Colin Cross
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-10-09Revert "Make lots of tests run in parallel" Colin Cross
This reverts commit 323dc60712491c71ccdc5363c42df61f0a192487. Reason for revert: Possible cause of test instability Bug: 170513220 Test: soong tests Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-06Make lots of tests run in parallel Colin Cross
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
2019-12-18Move filesystem into Config Colin Cross
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-11-25Make TestContext.RegisterModuleType take an android.ModuleFactory Colin Cross
Avoid having to pass ModuleFactoryAdaptor to every call to RegisterModuleType in a test by wrapping RegisterModuleType. Test: all soong tests Change-Id: If8847d16487de0479cc3020b728256922b3cadba
2019-10-18Create C-Suite config module karenluo
* Defined a build target csuite_config.go for C-Suite, so that C-Suite test modules can be declare in Android.bp files. * Modified vts_config.go to use the general Makefile suite_host_config.mk. Test: make csuite, forrest test for vts Change-Id: I5f67c54e05b113ac6c5d226930618e6811e6e602 Merged-In: I5f67c54e05b113ac6c5d226930618e6811e6e602