diff --git a/Makefile b/Makefile index 8db370bb..66f69076 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ COMMIT := $(shell git log | head -n 1 | awk '{print substr($$2, 0, 12)}') NOW := $(shell date +"%FT%T%z") # ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -TESTFOLDER := $(shell $(GO) list ./... | grep -E 'api|model|flow|script|fs|i18n|connector|query|plugin|cert' | grep -vE 'examples|tests*|config|widgets') +TESTFOLDER := $(shell $(GO) list ./... | grep -E 'api|model|flow|script|fs|i18n|connector|query|plugin|cert|crypto' | grep -vE 'examples|tests*|config|widgets') TESTTAGS ?= "" # TESTWIDGETS := $(shell $(GO) list ./widgets/...) diff --git a/main.go b/main.go index b59480eb..7ded00d2 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,6 @@ import ( _ "github.com/yaoapp/gou/encoding" _ "github.com/yaoapp/yao/crypto" _ "github.com/yaoapp/yao/helper" - _ "github.com/yaoapp/yao/system" _ "github.com/yaoapp/yao/utils" ) diff --git a/system/process.go b/system/process.go deleted file mode 100644 index c1155c60..00000000 --- a/system/process.go +++ /dev/null @@ -1,33 +0,0 @@ -package system - -// func init() { -// // gou.RegisterProcessHandler("yao.system.Exec", processExec) -// } - -// // processExec execute the system command -// func processExec(process *gou.Process) interface{} { -// process.ValidateArgNums(1) -// cmd := process.ArgsString(0) - -// _, err := exec.LookPath(cmd) -// if err != nil { -// exception.New("command %s not found: %s", 400, cmd, err.Error()).Throw() -// return nil -// } - -// args := []string{} -// for i, arg := range process.Args { -// if i == 0 { -// continue -// } -// args = append(args, fmt.Sprintf("%v", arg)) -// } - -// res, err := exec.Command(cmd, args...).Output() -// if err != nil { -// exception.New("command %s error: %s", 500, cmd, err.Error()).Throw() -// return nil -// } - -// return strings.TrimRight(string(res), "\n") -// } diff --git a/system/process_test.go b/system/process_test.go deleted file mode 100644 index bfad991d..00000000 --- a/system/process_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package system - -// func TestProcessReturn(t *testing.T) { -// output, err := process.New("yao.system.Exec", "echo", "hello").Exec() -// if err != nil { -// t.Fatal(err) -// } -// assert.Equal(t, "hello", output) -// } diff --git a/system/system.go b/system/system.go deleted file mode 100644 index bfd256e1..00000000 --- a/system/system.go +++ /dev/null @@ -1,4 +0,0 @@ -package system - -// Exec call system command -// func Exec(cmd string, args ...string) {}