summaryrefslogtreecommitdiff
path: root/android/module_test.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-01-18 20:12:02 +0000
committer Cole Faust <colefaust@google.com> 2024-01-18 12:43:24 -0800
commit9a346f6da3d776d152a1dd39f0bbed8928c059f2 (patch)
tree538b602297e419c0667040e9d214bb7997574a7b /android/module_test.go
parentf29b80c51fbbdf0ec590b284f658ad356a9e7230 (diff)
Remove SymlinkOutputs
symlink_outputs was added so bazel could run ninja files, but we abanoned that approach in roboleaf, and then roboleaf was cancelled entirely. Remove this feature so we're more compatible with upstream ninja / n2. Bug: 160568334 Test: Presubmits Change-Id: Ic368c48dd01b68e51c471c3fe90d0c02c55956e9
Diffstat (limited to 'android/module_test.go')
-rw-r--r--android/module_test.go49
1 files changed, 2 insertions, 47 deletions
diff --git a/android/module_test.go b/android/module_test.go
index 1ca742213..1f3db5c5c 100644
--- a/android/module_test.go
+++ b/android/module_test.go
@@ -15,10 +15,11 @@
package android
import (
- "github.com/google/blueprint"
"path/filepath"
"runtime"
"testing"
+
+ "github.com/google/blueprint"
)
func TestSrcIsModule(t *testing.T) {
@@ -244,52 +245,6 @@ func TestErrorDependsOnDisabledModule(t *testing.T) {
RunTestWithBp(t, bp)
}
-func TestValidateCorrectBuildParams(t *testing.T) {
- config := TestConfig(t.TempDir(), nil, "", nil)
- pathContext := PathContextForTesting(config)
- bparams := convertBuildParams(BuildParams{
- // Test with Output
- Output: PathForOutput(pathContext, "undeclared_symlink"),
- SymlinkOutput: PathForOutput(pathContext, "undeclared_symlink"),
- })
-
- err := validateBuildParams(bparams)
- if err != nil {
- t.Error(err)
- }
-
- bparams = convertBuildParams(BuildParams{
- // Test with ImplicitOutput
- ImplicitOutput: PathForOutput(pathContext, "undeclared_symlink"),
- SymlinkOutput: PathForOutput(pathContext, "undeclared_symlink"),
- })
-
- err = validateBuildParams(bparams)
- if err != nil {
- t.Error(err)
- }
-}
-
-func TestValidateIncorrectBuildParams(t *testing.T) {
- config := TestConfig(t.TempDir(), nil, "", nil)
- pathContext := PathContextForTesting(config)
- params := BuildParams{
- Output: PathForOutput(pathContext, "regular_output"),
- Outputs: PathsForOutput(pathContext, []string{"out1", "out2"}),
- ImplicitOutput: PathForOutput(pathContext, "implicit_output"),
- ImplicitOutputs: PathsForOutput(pathContext, []string{"i_out1", "_out2"}),
- SymlinkOutput: PathForOutput(pathContext, "undeclared_symlink"),
- }
-
- bparams := convertBuildParams(params)
- err := validateBuildParams(bparams)
- if err != nil {
- FailIfNoMatchingErrors(t, "undeclared_symlink is not a declared output or implicit output", []error{err})
- } else {
- t.Errorf("Expected build params to fail validation: %+v", bparams)
- }
-}
-
func TestDistErrorChecking(t *testing.T) {
bp := `
deps {