diff --git a/bpfix/bpfix/bpfix_test.go b/bpfix/bpfix/bpfix_test.go index 672e852d4..b5b49b1ab 100644 --- a/bpfix/bpfix/bpfix_test.go +++ b/bpfix/bpfix/bpfix_test.go @@ -19,6 +19,7 @@ package bpfix import ( "bytes" "fmt" + "os" "reflect" "strings" "testing" @@ -2215,3 +2216,9 @@ func TestRemoveResourceAndAssetsIfDefault(t *testing.T) { }) } } + +func TestMain(m *testing.M) { + // Skip checking Android.mk path with cleaning "ANDROID_BUILD_TOP" + os.Setenv("ANDROID_BUILD_TOP", "") + os.Exit(m.Run()) +} diff --git a/partner/androidmk/androidmk_test.go b/partner/androidmk/androidmk_test.go index 6bae836d9..3ace7502d 100644 --- a/partner/androidmk/androidmk_test.go +++ b/partner/androidmk/androidmk_test.go @@ -54,6 +54,9 @@ cc_library_shared { } func TestEndToEnd(t *testing.T) { + // Skip checking Android.mk path with cleaning "ANDROID_BUILD_TOP" + t.Setenv("ANDROID_BUILD_TOP", "") + for i, test := range testCases { expected, err := bpfix.Reformat(test.expected) if err != nil {