summaryrefslogtreecommitdiff
path: root/java/dexpreopt_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2025-01-29 15:53:21 -0800
committer Colin Cross <ccross@android.com> 2025-01-31 11:31:24 -0800
commit844cb6a6646454aaba28b602cf49284df32cdc9f (patch)
tree7c9ee579c7821f59b44e7a035b2a703fa5a2ab08 /java/dexpreopt_test.go
parent03272a40f104893ae6082aaeb882216fec4eb1f3 (diff)
Add t.Parallel() to java tests
Speeds up go test ./java from 32 seconds to 9 seconds. Test: go test ./java Change-Id: I4c6640e787c0744c6dfda03b7382839b452e24cf
Diffstat (limited to 'java/dexpreopt_test.go')
-rw-r--r--java/dexpreopt_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/dexpreopt_test.go b/java/dexpreopt_test.go
index 207ff65b3..53a0d71fd 100644
--- a/java/dexpreopt_test.go
+++ b/java/dexpreopt_test.go
@@ -30,6 +30,7 @@ func init() {
}
func TestDexpreoptEnabled(t *testing.T) {
+ t.Parallel()
tests := []struct {
name string
bp string
@@ -219,6 +220,7 @@ func TestDexpreoptEnabled(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
+ t.Parallel()
preparers := android.GroupFixturePreparers(
PrepareForTestWithDexpreopt,
PrepareForTestWithFakeApexMutator,
@@ -258,6 +260,7 @@ func enabledString(enabled bool) string {
}
func TestDex2oatToolDeps(t *testing.T) {
+ t.Parallel()
if runtime.GOOS != "linux" {
// The host binary paths checked below are build OS dependent.
t.Skipf("Unsupported build OS %s", runtime.GOOS)
@@ -273,6 +276,7 @@ func TestDex2oatToolDeps(t *testing.T) {
name := fmt.Sprintf("sourceEnabled:%t,prebuiltEnabled:%t,prebuiltPreferred:%t",
sourceEnabled, prebuiltEnabled, prebuiltPreferred)
t.Run(name, func(t *testing.T) {
+ t.Parallel()
result := preparers.RunTestWithBp(t, fmt.Sprintf(`
cc_binary {
name: "dex2oatd",