Browse Source

Merge pull request #1497 from LadyMozzarella/lgratrix-fix-evhttpsharp

Update Fix EvHttpSharp
Brittany Mazza 10 years ago
parent
commit
ca274be033

+ 0 - 8
frameworks/CSharp/evhttp-sharp/bash_profile.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-export MONO_ROOT=${IROOT}/mono-3.6.0-install
-
-export PATH="$MONO_ROOT/bin:$PATH"
-
-# Needed to find Mono's shared libraries
-export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 0 - 28
frameworks/CSharp/evhttp-sharp/setup.py

@@ -1,28 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  if os.name == 'nt':
-    return 1
-  
-  # build
-  subprocess.check_call("rm -rf bin obj", shell=True, cwd="evhttp-sharp", stdout=logfile, stderr=errfile)
-  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="evhttp-sharp/src", stdout=logfile, stderr=errfile)
-  os.environ['MONO_GC_PARAMS']="nursery-size=64m"
-  subprocess.Popen("mono -O=all $TROOT/src/bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads), shell=True, cwd="evhttp-sharp", stdout=logfile, stderr=errfile)
-
-def stop(logfile, errfile):
-  if os.name == 'nt':
-    return 0
-  
-  # stop mono
-  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p.communicate()
-  for line in out.splitlines():
-    if 'mono' in line and not 'run-ci' in line and not 'run-tests' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-
-  return 0

+ 16 - 0
frameworks/CSharp/evhttp-sharp/setup.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+#mono environment variables
+. ${IROOT}/mono.installed
+
+#extra cleaning
+rm -rf src/bin src/obj
+
+xbuild src/EvHttpSharpBenchmark.csproj /t:Clean
+xbuild src/EvHttpSharpBenchmark.csproj /p:Configuration=Release
+
+export MONO_GC_PARAMS=nursery-size=64m
+
+mono -O=all $TROOT/src/bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 $MAX_THREADS &