sweet/cmd/sweet: make TestSweetEndToEnd dump PGO logs

Right now if the PGO step fails, the logs printed by TestSweetEndToEnd
are pretty useless. Make it dump the PGO logs just like it dumps the
regular logs on failure

Change-Id: Id6530d967ff98dcb1d5b480b950bc9fcc51b08ea
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/600755
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/sweet/cmd/sweet/integration_test.go b/sweet/cmd/sweet/integration_test.go
index f223e10..9d58ea9 100644
--- a/sweet/cmd/sweet/integration_test.go
+++ b/sweet/cmd/sweet/integration_test.go
@@ -153,13 +153,20 @@
 		defer outputMu.Unlock()
 
 		// Poke at the results directory.
-		matches, err := filepath.Glob(filepath.Join(resultsDir, "*", "go.results"))
-		if err != nil {
-			t.Errorf("failed to search results directory for results: %v", err)
+		var matches []string
+		addMatches := func(fileName string) {
+			m1, err := filepath.Glob(filepath.Join(resultsDir, "*", fileName))
+			if err != nil {
+				t.Errorf("failed to search results directory for %s: %v", fileName, err)
+			} else if len(m1) == 0 {
+				t.Logf("no %s results", fileName)
+			}
+			matches = append(matches, m1...)
 		}
-		if len(matches) == 0 {
-			t.Log("no results produced.")
+		if hasPGO {
+			addMatches("go.profile.results")
 		}
+		addMatches("go.results")
 
 		// Dump additional information in case of error, and
 		// check for reasonable results in the case of no error.