diff --git a/test/instrumentation/BUILD b/test/instrumentation/BUILD index 7221bf609cc..01002628640 100644 --- a/test/instrumentation/BUILD +++ b/test/instrumentation/BUILD @@ -44,7 +44,7 @@ genrule( "//:all-srcs", ], outs = ["stable-metrics-list.yaml"], - cmd = "./$(locations :instrumentation) $(locations //:all-srcs) > $@", + cmd = "for loc in $(locations //:all-srcs); do echo $$loc; done | ./$(locations :instrumentation) - > $@", message = "Listing all stable metrics.", tools = [":instrumentation"], ) diff --git a/test/instrumentation/main.go b/test/instrumentation/main.go index a997c68a300..96d9655bfc9 100644 --- a/test/instrumentation/main.go +++ b/test/instrumentation/main.go @@ -17,6 +17,7 @@ limitations under the License. package main import ( + "bufio" "flag" "fmt" "go/ast" @@ -42,18 +43,34 @@ const ( func main() { flag.Parse() if len(flag.Args()) < 1 { - fmt.Fprintf(os.Stderr, "USAGE: %s