Browse Source

Merge pull request #1185 from TechEmpower/1184

Fixed a bunch of Golang frameworks
Mike Smith 10 years ago
parent
commit
4656ba65ca

+ 0 - 2
config/benchmark_profile

@@ -14,8 +14,6 @@ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
 export RESIN_HOME=${IROOT}/resin-4.0.41
 export GRAILS_HOME=${IROOT}/grails-2.4.2
 export VERTX_HOME=${IROOT}/vert.x-2.1.1
-export GOROOT=${IROOT}/go
-export GOPATH=${FWROOT}/go:${FWROOT}/webgo:${FWROOT}/revel
 export TOMCAT_HOME=${IROOT}/apache-tomcat-7.0.35
 export NODE_HOME=${IROOT}/node-v0.10.8-linux-x64
 export PLAY_HOME=${IROOT}/play-2.2.0

+ 7 - 0
frameworks/Go/beego/bash_profile.sh

@@ -0,0 +1,7 @@
+# Set the root of our go installation
+export GOROOT=${IROOT}/go
+
+# Where to find the go executable
+export PATH="$GOROOT/bin:$PATH"
+
+export GOPATH=${TROOT}

+ 0 - 1
frameworks/Go/beego/setup.py

@@ -8,7 +8,6 @@ def start(args, logfile, errfile):
     subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\beego&&go get ./...", shell=True, cwd="beego", stderr=errfile, stdout=logfile)
     subprocess.Popen("setup.bat", shell=True, cwd="beego", stderr=errfile, stdout=logfile)
     return 0
-  os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/beego')
   subprocess.call("go get ./...", shell=True, cwd="beego", stderr=errfile, stdout=logfile)
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="beego", stderr=errfile, stdout=logfile)
   return 0

+ 1 - 1
frameworks/Go/go/bash_profile.sh

@@ -4,4 +4,4 @@ export GOROOT=${IROOT}/go
 # Where to find the go executable
 export PATH="$GOROOT/bin:$PATH"
 
-export GOPATH=${FWROOT}/go
+export GOPATH=${TROOT}

+ 0 - 1
frameworks/Go/go/setup.py

@@ -12,7 +12,6 @@ def start(args, logfile, errfile):
     subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile)
     subprocess.Popen("setup.bat", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
     return 0
-  # os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/go')
   subprocess.call("go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go", stderr=errfile, stdout=logfile)
   return 0

+ 7 - 0
frameworks/Go/gorail/bash_profile.sh

@@ -0,0 +1,7 @@
+# Set the root of our go installation
+export GOROOT=${IROOT}/go
+
+# Where to find the go executable
+export PATH="$GOROOT/bin:$PATH"
+
+export GOPATH=${TROOT}

+ 3 - 0
frameworks/Go/gorail/install.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+fw_depends go

+ 0 - 1
frameworks/Go/gorail/setup.py

@@ -12,7 +12,6 @@ def start(args, logfile, errfile):
     subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\gorail&& go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile)
     subprocess.Popen("setup.bat", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
     return 0
-  os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/gorail')
   subprocess.call("go get -u github.com/gorail/core", shell=True, cwd="gorail", stderr=errfile, stdout=logfile)
   subprocess.call("go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go", stderr=errfile, stdout=logfile)

+ 7 - 0
frameworks/Go/revel-qbs/bash_profile.sh

@@ -0,0 +1,7 @@
+# Set the root of our go installation
+export GOROOT=${IROOT}/go
+
+# Where to find the go executable
+export PATH="$GOROOT/bin:$PATH"
+
+export GOPATH=${TROOT}

+ 1 - 2
frameworks/Go/revel-qbs/setup.py

@@ -15,7 +15,6 @@ def start(args, logfile, errfile):
     subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env, stderr=errfile, stdout=logfile)
     subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env, stderr=errfile, stdout=logfile)
     return 0
-  os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/revel-qbs')
   subprocess.call("go get -u github.com/robfig/revel/revel github.com/coocood/qbs", shell=True, cwd=CWD, stderr=errfile, stdout=logfile)
   subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD, stderr=errfile, stdout=logfile)
   subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD, stderr=errfile, stdout=logfile)
@@ -29,7 +28,7 @@ def stop(logfile, errfile):
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   for line in out.splitlines():
-    if 'revel' in line and 'run-tests' not in line:
+    if 'revel' in line and 'run-tests' not in line and 'run-ci' not in line:
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 15)
   return 0

+ 7 - 0
frameworks/Go/revel/bash_profile.sh

@@ -0,0 +1,7 @@
+# Set the root of our go installation
+export GOROOT=${IROOT}/go
+
+# Where to find the go executable
+export PATH="$GOROOT/bin:$PATH"
+
+export GOPATH=${TROOT}

+ 1 - 2
frameworks/Go/revel/setup.py

@@ -15,7 +15,6 @@ def start(args, logfile, errfile):
     subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd="revel", env=env, stderr=errfile, stdout=logfile)
     subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd="revel", env=env, stderr=errfile, stdout=logfile)
     return 0
-  os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/revel')
   subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", stderr=errfile, stdout=logfile)
   subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd="revel", stderr=errfile, stdout=logfile)
   subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd="revel", stderr=errfile, stdout=logfile)
@@ -29,7 +28,7 @@ def stop(logfile, errfile):
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   for line in out.splitlines():
-    if 'revel' in line and 'run-tests' not in line:
+    if 'revel' in line and 'run-tests' not in line and 'run-ci' not in line:
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 15)
   return 0

+ 7 - 0
frameworks/Go/webgo/bash_profile.sh

@@ -0,0 +1,7 @@
+# Set the root of our go installation
+export GOROOT=${IROOT}/go
+
+# Where to find the go executable
+export PATH="$GOROOT/bin:$PATH"
+
+export GOPATH=${TROOT}

+ 0 - 1
frameworks/Go/webgo/setup.py

@@ -8,7 +8,6 @@ def start(args, logfile, errfile):
     subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\webgo&&go get ./...", shell=True, cwd="webgo", stderr=errfile, stdout=logfile)
     subprocess.Popen("setup.bat", shell=True, cwd="webgo", stderr=errfile, stdout=logfile) 
     return 0
-  os.environ["GOPATH"] = os.path.expanduser('~/FrameworkBenchmarks/webgo')
   subprocess.call("go get ./...", shell=True, cwd="webgo", stderr=errfile, stdout=logfile)
   subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="webgo", stderr=errfile, stdout=logfile)
   return 0