aboutsummaryrefslogtreecommitdiff
path: root/src/dht/test_dht_tools.py.in
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2017-07-03 10:31:57 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2017-07-03 10:31:57 +0200
commitf599b93d5b402cfa795aaf7bd7057d76c5e57d67 (patch)
tree0f953e5343e27e91e47f7ccc72756207437d023e /src/dht/test_dht_tools.py.in
parentd80df28d5f4814f93b8aa536a1064c77e3d659cc (diff)
parent6cc0e50715eb97baac69c05141f3f3bb3df4ec75 (diff)
downloadgnunet-f599b93d5b402cfa795aaf7bd7057d76c5e57d67.tar.gz
gnunet-f599b93d5b402cfa795aaf7bd7057d76c5e57d67.zip
Merge remote-tracking branch 'origin/master' into credentials
Diffstat (limited to 'src/dht/test_dht_tools.py.in')
-rw-r--r--src/dht/test_dht_tools.py.in13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dht/test_dht_tools.py.in b/src/dht/test_dht_tools.py.in
index 5ceabbfad..f5dd14f67 100644
--- a/src/dht/test_dht_tools.py.in
+++ b/src/dht/test_dht_tools.py.in
@@ -36,18 +36,16 @@ else:
36 put = './gnunet-dht-put' 36 put = './gnunet-dht-put'
37 arm = 'gnunet-arm' 37 arm = 'gnunet-arm'
38 38
39tf, tempcfg = tempfile.mkstemp (prefix='test_dht_api_peer1.') 39cfgfile = 'test_dht_api_peer1.conf'
40os.close (tf) 40
41 41run_get = [get, '-c', cfgfile]
42run_get = [get, '-c', tempcfg] 42run_put = [put, '-c', cfgfile]
43run_put = [put, '-c', tempcfg] 43run_arm = [arm, '-c', cfgfile]
44run_arm = [arm, '-c', tempcfg]
45debug = os.getenv ('DEBUG') 44debug = os.getenv ('DEBUG')
46if debug: 45if debug:
47 run_arm += [debug.split (' ')] 46 run_arm += [debug.split (' ')]
48 47
49def cleanup (exitcode): 48def cleanup (exitcode):
50 os.remove (tempcfg)
51 sys.exit (exitcode) 49 sys.exit (exitcode)
52 50
53def sub_run (args, want_stdo = True, want_stde = False, nofail = False): 51def sub_run (args, want_stdo = True, want_stde = False, nofail = False):
@@ -104,7 +102,6 @@ def print_only_failer (command, rc, stdo, stde, normal):
104 print ("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format (command, stdo, stde)) 102 print ("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format (command, stdo, stde))
105 cleanup (1) 103 cleanup (1)
106 104
107shutil.copyfile ('test_dht_api_peer1.conf', tempcfg)
108 105
109print ("TEST: Starting ARM...", end='') 106print ("TEST: Starting ARM...", end='')
110r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False) 107r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False)