Browse Source

verify Fixed onion tests

Mike Smith 11 years ago
parent
commit
abb2ba59ce
3 changed files with 11 additions and 1 deletions
  1. 1 1
      onion/hello.c
  2. 2 0
      onion/setup.py
  3. 8 0
      toolset/setup/linux/installer.py

+ 1 - 1
onion/hello.c

@@ -72,7 +72,7 @@ onion_connection_status return_json(onion_dict *json, onion_request *req, onion_
 /// Gets the dict and converts it to JSON and writes it into the response. 
 onion_connection_status return_json_libjson(void *_, onion_request *req, onion_response *res){
 	json_object *hello=json_object_new_object();
-	json_object_object_add(hello, "message", json_object_new_string("Hello, world"));
+	json_object_object_add(hello, "message", json_object_new_string("Hello, World!"));
 	
 	const char *hello_str=json_object_to_json_string(hello);
 	int size=strlen(hello_str);

+ 2 - 0
onion/setup.py

@@ -6,6 +6,8 @@ import setup_util
 def start(args, logfile, errfile):
   setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
   os.putenv("ONION_LOG","noinfo")
+  subprocess.call("rm *.o", cwd="onion", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.call("cp -R installs/onion/* onion/onion", shell=True, stderr=errfile, stdout=logfile)
   subprocess.Popen("make && ./hello", shell=True, cwd="onion", stderr=errfile, stdout=logfile)
   return 0
 

+ 8 - 0
toolset/setup/linux/installer.py

@@ -304,6 +304,14 @@ class Installer:
     #
     self.__run_command("git clone git://github.com/dom96/jester.git jester/jester", retry=True)
 
+    #
+    # Onion
+    #
+    self.__run_command("git clone [email protected]:davidmoreno/onion.git")
+    self.__run_command("mkdir build", cwd="onion")
+    self.__run_command("cmake ..", cwd="onion/build")
+    self.__run_command("make", cwd="onion/build")
+
     print("\nINSTALL: Finished installing server software\n")
   ############################################################
   # End __install_server_software