-LRN: fix integration tests
authorChristian Grothoff <christian@grothoff.org>
Mon, 25 Jun 2012 07:17:55 +0000 (07:17 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 25 Jun 2012 07:17:55 +0000 (07:17 +0000)
src/integration-tests/test_integration_bootstrap_and_connect.py.in
src/integration-tests/test_integration_bootstrap_and_connect_and_disconnect.py.in
src/integration-tests/test_integration_bootstrap_and_connect_and_disconnect_nat.py.in
src/integration-tests/test_integration_clique.py.in
src/integration-tests/test_integration_clique_nat.py.in
src/integration-tests/test_integration_connect_on_restart.py.in
src/integration-tests/test_integration_connection_values_tcp.py.in
src/integration-tests/test_integration_connection_values_tcp_udp.py.in
src/integration-tests/test_integration_connection_values_tcp_udp_http.py.in
src/integration-tests/test_integration_disconnect.py.in
src/integration-tests/test_integration_restart.py.in

index 0b29b460defa60081997337c450bae83841a48f6..cd3bdbef86f8dc06981f8b7e2e77608a7d9b9d83 100755 (executable)
@@ -51,14 +51,14 @@ testname = "test_integration_bootstrap_and_connect"
 verbose = True
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)    
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
 
 def success_cont (check):
     global success
index 76e69b7cbd90d4ad7ebd90425d00e23c430e62fe..3ca0aea864e9668c62dfd2b64b3ccea76963e955 100755 (executable)
@@ -51,14 +51,14 @@ testname = "test_integration_bootstrap_and_connect"
 verbose = True
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)    
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
 
 def success_server_stop_cont (check):
     global success 
index 3269f4dc44ee57b3d99879d6b6af1914c98b4f4a..55982c2e4bfdaee891c13040901ce19e01023dc4 100755 (executable)
@@ -51,14 +51,14 @@ testname = "test_integration_bootstrap_and_connect"
 verbose = True
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)    
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
 
 def success_server_stop_cont (check):
     global success 
index 7c3fdd8a9a9d607c03a7425904173406fa5c3870..6c7a5d770e9c0a1dd4e1ffd16192e6457309ce6b 100755 (executable)
@@ -36,6 +36,10 @@ from gnunet_testing import Check
 from gnunet_testing import Condition
 from gnunet_testing import * 
  
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 #definitions
 
@@ -45,14 +49,9 @@ check_timeout = 180
 
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client_2"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client_2/", True)
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client_2"), True)
 
 
 def success_cont (check):
index 48dfa61cd2862f12b60990917a58d70eeb02827b..a457e8d8395e08a6b733f5bf7e79aa97595d607e 100755 (executable)
@@ -37,6 +37,10 @@ from gnunet_testing import Check
 from gnunet_testing import Condition
 from gnunet_testing import * 
  
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 #definitions
 testname = "test_integration_clique_nat"
@@ -45,14 +49,9 @@ check_timeout = 180
 
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_bootstrap_server"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_nat_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)
-           shutil.rmtree ("/tmp/c_nat_client/", True)
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
+    shutil.rmtree (os.path.join (tmp, "c_nat_client"), True)
 
 
 def success_cont (check):
index 7215b9bf38e43ad0315ac2fb76754a191f346830..0b23c8fe80762fd3d0199ae6d381bd9ea3f66fef 100755 (executable)
@@ -45,16 +45,15 @@ testname = "test_integration_clique"
 verbose = True
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_bootstrap_server"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client_2"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client_2/", True)
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client_2"), True)
 
 
 def success_cont (check):
index 8c359ff8dcf88968950074c4056650a7f37a77aa..efcf5c7fdd9596c5beb834c21c735056d266df62 100755 (executable)
@@ -36,6 +36,10 @@ from gnunet_testing import Check
 from gnunet_testing import Condition
 from gnunet_testing import * 
  
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 #definitions
 
@@ -45,10 +49,7 @@ check_timeout = 180
 
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_normal_client/", True)
+    shutil.rmtree (os.path.join (tmp, "c_normal_client"), True)
 
 
 def success_cont (check):
index 4403c90920d4b2d0cfe5dafadedc6fbadd456e62..cfb10432b82b1c66a3bd3e93dc1b76e163982a30 100755 (executable)
@@ -43,13 +43,13 @@ testname = "test_integration_connection_value"
 verbose = True
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_normal_client/", True)
-
+    shutil.rmtree (os.path.join (tmp, "c_normal_client"), True)
 
 def success_cont (check):
     global success 
index 6cd0613792b0123cb26ac28db82f220b37c08b0f..4e9e72e4e8aae91deac324f7b8b5eaf2bd987ea6 100755 (executable)
@@ -36,6 +36,10 @@ from gnunet_testing import Check
 from gnunet_testing import Condition
 from gnunet_testing import * 
  
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 #definitions
 
@@ -45,10 +49,7 @@ check_timeout = 180
 
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_normal_client/", True)
+    shutil.rmtree (os.path.join (tmp, "c_normal_client"), True)
 
 
 def success_cont (check):
index afeb5a968e1c9514856a84b2dc4073e3f6745bc4..2a863f8b2773a3f5b6aa863c959aaa6fda12b41f 100755 (executable)
@@ -45,14 +45,14 @@ testname = "test_integration_disconnect"
 verbose = True
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_bootstrap_server"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)    
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
 
 
 def success_disconnect_cont (check):
index cdf335f51c3a1de953906ad3d07d7fc1d659f68d..b3d3ecd18606338292e76a7c869e22f6b790d7e8 100755 (executable)
@@ -46,14 +46,14 @@ testname = "test_integration_restart"
 verbose = False
 check_timeout = 180
 
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_bootstrap_server/", True)
-           shutil.rmtree ("/tmp/c_no_nat_client/", True)    
+    shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+    shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
 
 
 def success_restart_cont (check):