summaryrefslogtreecommitdiff
path: root/golang/golang_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
2025-01-06Always use out/host for host tools Cole Faust
Previously, files were installed to out/host or out/soong/host based on if kati was used or not. That was changed in aosp/3418304, but this HostToolDir() that's used by blueprint was not updated to match that change, so soong-only builds were failing with missing host tools. Bug: 388038396 Test: m --soong-only dist, ./prebuilts/build-tools/build-prebuilts.sh Change-Id: Ib104a6399ce2308d81651ec620323caaf9c76151
2024-10-09Merge "Update test for go modules with mutliple variants" into main Cole Faust
2024-10-07Annotate mutators that use methods that prevent mutator coalescing Colin Cross
Mutator coalescing reduces the overhead of visiting every module for every mutator by calling a series of mutator methods on a a single module in a row. This is only valid for well-behaved mutators. Add methods on MutatorHandle that allow annotating mutators that are not well behaved, and use that to prevent coalescing mutators. Bug: 372076859 Test: all soong tests pass with race detector on Flag: EXEMPT refactor Change-Id: Id9b005f05227e5558cac6d488030a7398af13fb8
2024-10-04Update test for go modules with mutliple variants Cole Faust
Go modules now generate files into a variant-specific subfolder. Since that subfolder depends on the host os/arch, don't explicitly check its value, but instead allow anything there. Bug: 369916167 Test: m --no-skip-soong-tests Change-Id: I37e395c866d34f596f0936b720b89c8f9615dcf8
2024-09-11Wrap blueprint_go_binary and bootstrap_go_package into android.Modules Colin Cross
Depending on a blueprint_go_binary from a Soong module requires hacks that allow Soong to support both blueprint.Module and android.Module. Wrap the blueprint Go module types with ones that implement android.Module, and delete all the related hacks. Bug: 319288033 Test: m checkbuild Flag: EXEMPT refactor Change-Id: I9b62b450de09bd10288333fbc66aa71c867ae0b3