aboutsummaryrefslogtreecommitdiff
path: root/bpf/bpf_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Remove ConvertWithBp2build implementationsColin Cross2023-12-081-23/+0
| | | | | | | | | Remove the ConvertWithBp2build implementations from all the module types, along with the related code. Bug: 315353489 Test: m blueprint_tests Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
* Incorporate bpf into mixed buildsZi Wang2022-10-071-0/+23
| | | | | | Bug: 240163393 Test: TestBpfWithBazel in bpf_test.go Change-Id: I1d24a9c0d1d6911987c730bf1b5b7e02d6e73a5e
* Disallow '_' in bpf source nameKen Chen2022-07-071-2/+15
| | | | | | | | | | | | | | | | | | Current design: 1. The bpf compiled object name is derived from the source name (e.g. foo.c -> foo.o). 2. Full bpf program/map name are concatenated by object name + '_' + program/map name in run-time. (e.g. obj name: x.o; program name: y_z; full bpf program name will be x_y_z) Issue: x.o with map y_z and x_y.o with map z can cause naming collision in run-time, since both result in x_y_z. This commit prevents it from happening with a build-time check. Bug: 236706995 Test: m Change-Id: Ic03bfcf07a5748ed63246b71d5ae8de0405e658a
* Remove usages of FixtureFactory from misc packagesPaul Duffin2021-03-221-3/+2
| | | | | | | | | These packages have already been migrated to use per test build directory so have no need for a FixtureFactory. Bug: 183235980 Test: m nothing Change-Id: I667d1d992caaf0f615de91f89efdae11c44986c2
* Migrate bpf package to a per test build directoryPaul Duffin2021-03-171-25/+2
| | | | | | Bug: 182885307 Test: m nothing Change-Id: I0ee9575af056057ca37831a3afebba2be1e54d27
* Support test fixtures in bpf packagePaul Duffin2021-03-091-25/+12
| | | | | | | | | | Restructures the bpf package test setup code to create FixturePreparer instances for setting up a test fixture and converts the test to use it. Bug: 181070625 Test: m nothing Change-Id: I7c76ed6dc292ca92d76ef95c4167f7ca2d68e1af
* Pass Config to NewTestContext instead of ctx.RegisterColin Cross2020-11-121-2/+2
| | | | | | | | | | | 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
* Revert "Make lots of tests run in parallel"Colin Cross2020-10-091-1/+0
| | | | | | | | | | This reverts commit 323dc60712491c71ccdc5363c42df61f0a192487. Reason for revert: Possible cause of test instability Bug: 170513220 Test: soong tests Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
* Make lots of tests run in parallelColin Cross2020-10-061-0/+1
| | | | | | | | | | 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
* Include bpf program in APEXesmarkchien2020-09-021-1/+1
| | | | | | | | | bpf program is put to an APEX via 'bpfs' property. It is placed under etc/bpf directory in it. Fix: 167530625 Test: m Change-Id: Ia36b486f0cffb619ecc4f7a318cde881abc5baf4
* Move filesystem into ConfigColin Cross2019-12-181-5/+10
| | | | | | | | | | | | 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-1/+1
| | | | | | | | Avoid having to pass ModuleFactoryAdaptor to every call to RegisterModuleType in a test by wrapping RegisterModuleType. Test: all soong tests Change-Id: If8847d16487de0479cc3020b728256922b3cadba
* Add bpf_test.go to build and fix testsColin Cross2019-05-171-105/+5
| | | | | | | | | | | | | | | | bpf_test.go was not listed in testSrcs, which meant it was not run during the build, but ran and failed with go test android/soong/... Don't redeclare the cc module types and mutators, use exported functions from cc/testing.go instead, which contain a new dependency needed by cc modules. This reapplies I4542640e8ff08e71565ed50617dbe67d86b29b69 after fixes for mac tests. Test: m Test: go test android/soong/... Change-Id: I3dc3fdedbd7063df4a2e0cadf2a4e0711b1823ad
* Revert "Add bpf_test.go to build and fix the tests"Colin Cross2019-05-141-7/+0
| | | | | | | | This reverts commit 192e3aa6a86c486c976cdd8587d5700aeb304241. Reason for revert: broke mac tests Change-Id: I3f4c679e11d9361dbc2daaf6c89282259b225d61
* Add bpf_test.go to build and fix the testsColin Cross2019-05-141-0/+7
| | | | | | | | | bpf_test.go was not listed in testSrcs, which meant it was not run during the build, but ran and failed with go test android/soong/... Test: m Test: go test android/soong/... Change-Id: I4542640e8ff08e71565ed50617dbe67d86b29b69
* Make bpf implement SourceFileProducer.Jaewoong Jung2018-12-171-0/+192
This allows other modules depend on bpf object outputs via the data property. Bug: 120246361 Test: bpf_test.go Change-Id: I2ba9b9fea4d60f896d16f34053eb04513eae30ea