aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-26 09:16:44 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-26 09:16:44 +0200
commit54ef397f1578ee8194c32bcf2d0a09f14afd9b64 (patch)
tree94c13c3f796c75ef443d8dba30aed7365a42ee0a /src/dht
parent556ccd6d483b3678867c3829e6979c307df04450 (diff)
downloadgnunet-54ef397f1578ee8194c32bcf2d0a09f14afd9b64.tar.gz
gnunet-54ef397f1578ee8194c32bcf2d0a09f14afd9b64.zip
fix test failure introduced by latest configuration parser fix, avoid unnecessary copying around of the configuration file
Diffstat (limited to 'src/dht')
-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)