support comments
E.g.
cat <<EOF | go run tools/fm/fm_bot.go -processLimit 0 -quiet -script - out/fm
b=cpu gms ct=8888 w=$WHERE/8888 legacy=true # old and busted
b=cpu gms ct=8888 w=$WHERE/srgb # new hotness
EOF
Change-Id: Ia92ba113ae95478313e1f2cc18b7270ea1aa8a42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205831
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/tools/fm/fm_bot.go b/tools/fm/fm_bot.go
index 794088c..da3baa5 100644
--- a/tools/fm/fm_bot.go
+++ b/tools/fm/fm_bot.go
@@ -83,6 +83,11 @@
sources := []string{}
flags := []string{}
for _, arg := range args {
+ // Everything after a # is a comment.
+ if strings.HasPrefix(arg, "#") {
+ break
+ }
+
// Treat "gm" or "gms" as a shortcut for all known GMs.
if arg == "gm" || arg == "gms" {
sources = append(sources, gms...)