sweet: merge pgo test into regular test

The builders are timing out because the PGO version redownloads assets
for the test (we delete them in between runs). There's really no reason
not to also run the pgo test with the regular step; the regular
benchmark executions still happen the same even with PGO mode enabled.

Change-Id: If5502ee0ef9bfee71be9999ce752d8f82535cc02
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/449655
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
diff --git a/sweet/cmd/sweet/integration_test.go b/sweet/cmd/sweet/integration_test.go
index 544a654..7c4b4d5 100644
--- a/sweet/cmd/sweet/integration_test.go
+++ b/sweet/cmd/sweet/integration_test.go
@@ -20,15 +20,6 @@
 )
 
 func TestSweetEndToEnd(t *testing.T) {
-	t.Run("standard", func(t *testing.T) {
-		testSweetEndToEnd(t, false)
-	})
-	t.Run("pgo", func(t *testing.T) {
-		testSweetEndToEnd(t, true)
-	})
-}
-
-func testSweetEndToEnd(t *testing.T, pgo bool) {
 	if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
 		t.Skip("Sweet is currently only fully supported on linux/amd64")
 	}
@@ -48,16 +39,12 @@
 		Env:  common.NewEnvFromEnviron(),
 	}
 
-	if pgo {
-		cmd := exec.Command(goTool.Tool, "help", "build")
-		out, err := cmd.Output()
-		if err != nil {
-			t.Fatalf("error running go help build: %v", err)
-		}
-		if !strings.Contains(string(out), "-pgo") {
-			t.Skip("toolchain missing -pgo support")
-		}
+	cmd := exec.Command(goTool.Tool, "help", "build")
+	out, err := cmd.Output()
+	if err != nil {
+		t.Fatalf("error running go help build: %v", err)
 	}
+	hasPGO := strings.Contains(string(out), "-pgo")
 
 	// Build sweet.
 	wd, err := os.Getwd()
@@ -134,8 +121,8 @@
 			"-work-dir", workDir,
 			"-short",
 		}
-		if pgo {
-			args = append(args, "-pgo")
+		if hasPGO {
+			args = append(args, "-pgo", "-pgo-count", "1")
 		}
 		args = append(args, cfgPath)
 		runCmd := exec.Command(sweetBin, args...)
@@ -208,7 +195,7 @@
 	defer f.Close()
 	cfg := common.ConfigFile{
 		Configs: []*common.Config{
-			&common.Config{
+			{
 				Name:   "go",
 				GoRoot: goRoot,
 			},