mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
scripts: go_srcs_in_module to list test packages files
The shell func go_srcs_in_module will now list 1. go src files 2. go test files belong to same packages 3. go test files that belong to _test packages Fixes #14827 Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
This commit is contained in:
parent
2feec4fe68
commit
18463081ad
@ -108,7 +108,7 @@ function relativePath {
|
||||
# go_srcs_in_module [package]
|
||||
# returns list of all not-generated go sources in the current (dir) module.
|
||||
function go_srcs_in_module {
|
||||
go list -f "{{with \$c:=.}}{{range \$f:=\$c.GoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{range \$f:=\$c.TestGoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{end}}" ./... | grep -vE "(\\.pb\\.go|\\.pb\\.gw.go)"
|
||||
go list -f "{{with \$c:=.}}{{range \$f:=\$c.GoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{range \$f:=\$c.TestGoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{range \$f:=\$c.XTestGoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{end}}" ./... | grep -vE "(\\.pb\\.go|\\.pb\\.gw.go)"
|
||||
}
|
||||
|
||||
# pkgs_in_module [optional:package_pattern]
|
||||
|
Loading…
x
Reference in New Issue
Block a user