Loading androidmk/androidmk/androidmk_test.go +16 −0 Original line number Diff line number Diff line Loading @@ -510,6 +510,22 @@ endif # b==false // endif `, }, { // Unsupported function case because that doesn't work in bp desc: "error for unsupported functions", in: ` include $(CLEAR_VARS) LOCAL_SRC_FILES := $(filter-out filter-out-file.java ,$(call all-java-files-under, src)) LOCAL_PACKAGE_NAME := foo include $(BUILD_PACKAGE) `, expected: ` android_app { name: "foo", srcs: ["UNSUPPORTED FUNCTION:filter-out filter-out-file.java src/**/*.java"], } `, }, { desc: "ignore all-makefiles-under", in: ` Loading androidmk/parser/scope.go +2 −4 Original line number Diff line number Diff line Loading @@ -14,9 +14,7 @@ package parser import ( "strings" ) import "strings" type Scope interface { Get(name string) string Loading Loading @@ -88,7 +86,7 @@ func (v Variable) EvalFunction(scope Scope) ([]string, bool) { if fname == "call" { return scope.Call(argVals[0], argVals[1:]), true } else { return []string{"__builtin_func:" + fname + " " + strings.Join(argVals, " ")}, true return []string{"UNSUPPORTED FUNCTION:" + fname + " " + strings.Join(argVals, " ")}, true } } } Loading Loading
androidmk/androidmk/androidmk_test.go +16 −0 Original line number Diff line number Diff line Loading @@ -510,6 +510,22 @@ endif # b==false // endif `, }, { // Unsupported function case because that doesn't work in bp desc: "error for unsupported functions", in: ` include $(CLEAR_VARS) LOCAL_SRC_FILES := $(filter-out filter-out-file.java ,$(call all-java-files-under, src)) LOCAL_PACKAGE_NAME := foo include $(BUILD_PACKAGE) `, expected: ` android_app { name: "foo", srcs: ["UNSUPPORTED FUNCTION:filter-out filter-out-file.java src/**/*.java"], } `, }, { desc: "ignore all-makefiles-under", in: ` Loading
androidmk/parser/scope.go +2 −4 Original line number Diff line number Diff line Loading @@ -14,9 +14,7 @@ package parser import ( "strings" ) import "strings" type Scope interface { Get(name string) string Loading Loading @@ -88,7 +86,7 @@ func (v Variable) EvalFunction(scope Scope) ([]string, bool) { if fname == "call" { return scope.Call(argVals[0], argVals[1:]), true } else { return []string{"__builtin_func:" + fname + " " + strings.Join(argVals, " ")}, true return []string{"UNSUPPORTED FUNCTION:" + fname + " " + strings.Join(argVals, " ")}, true } } } Loading