cmd/gogio: make e2e test output consistent

Fix a long-standing TODO: instead of each sub-test handling its own
output separately, just make each expose its output via an io.Reader.
Then, the shared driverBase code can tell if any of the lines contain
the magic "gio frame ready" string.

Reduces the amount of code a bit, but most importantly, it keeps the "is
a frame ready?" logic in a single place.

In the future, this also enables us to do more with all the e2e test app
output consistently. For example, we might want to add a -debug flag to
always log output lines as they happen.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
Daniel Martí
2020-05-10 17:31:14 +01:00
committed by Elias Naur
parent 9ad412ea0b
commit 023e022255
7 changed files with 54 additions and 83 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ func loop(w *app.Window) error {
w.Invalidate()
case notifyPrint:
notify = notifyNone
fmt.Println("frame ready")
fmt.Println("gio frame ready")
}
}
}