Browse Source

Updated snap setup file to modify database connection string

Patrick Falls 12 years ago
parent
commit
93caee1731
1 changed files with 3 additions and 3 deletions
  1. 3 3
      snap/setup.py

+ 3 - 3
snap/setup.py

@@ -4,10 +4,10 @@ import setup_util
 import os
 
 def start(args):
-  setup_util.replace_text("snap/bench/cfg/db.cfg", "host: .*", "host: \"" + args.database_host + "\"")
-  
+  setup_util.replace_text("snap/bench/cfg/db.cfg", "host=\".*\"", "host=\"" + args.database_host + "\"")
+  subprocess.check_call("cabal install HDBC HDBC-mysql MonadCatchIO-transformers configurator json snap-core snap-server resource-pool", shell=True)  
   subprocess.check_call("cabal configure", shell=True, cwd="snap/bench")
-  subprocess.check_call("cabal build", shell=True, cwd="snap/bench")
+  subprocess.check_call("cabal install", shell=True, cwd="snap/bench")
 
   subprocess.Popen("dist/build/snap-bench/snap-bench +RTS -N" + str(args.max_threads) + " > /dev/null", shell=True, cwd="snap/bench")
   return 0