Description: Fix paths for debian build system, and avoid recompiling
 prometheus.
--- a/cmd/prometheus/main_test.go
+++ b/cmd/prometheus/main_test.go
@@ -15,7 +15,6 @@
 
 import (
 	"flag"
-	"fmt"
 	"net/http"
 	"os"
 	"os/exec"
@@ -26,8 +25,8 @@
 	"github.com/prometheus/prometheus/util/testutil"
 )
 
-var promPath string
-var promConfig = filepath.Join("..", "..", "documentation", "examples", "prometheus.yml")
+var promPath = filepath.Join(os.Getenv("GOPATH"), "bin", "prometheus")
+var promConfig = filepath.Join(os.Getenv("GOPATH"), "..", "documentation", "examples", "prometheus.yml")
 var promData = filepath.Join(os.TempDir(), "data")
 
 func TestMain(m *testing.M) {
@@ -38,23 +37,16 @@
 	// On linux with a global proxy the tests will fail as the go client(http,grpc) tries to connect through the proxy.
 	os.Setenv("no_proxy", "localhost,127.0.0.1,0.0.0.0,:")
 
-	var err error
-	promPath, err = os.Getwd()
-	if err != nil {
-		fmt.Printf("can't get current dir :%s \n", err)
-		os.Exit(1)
-	}
-	promPath = filepath.Join(promPath, "prometheus")
-
+        /*
 	build := exec.Command("go", "build", "-o", promPath)
 	output, err := build.CombinedOutput()
 	if err != nil {
 		fmt.Printf("compilation error :%s \n", output)
 		os.Exit(1)
 	}
+        */
 
 	exitCode := m.Run()
-	os.Remove(promPath)
 	os.RemoveAll(promData)
 	os.Exit(exitCode)
 }
