diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-06-26 09:16:44 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-06-26 09:16:44 +0200 |
commit | 54ef397f1578ee8194c32bcf2d0a09f14afd9b64 (patch) | |
tree | 94c13c3f796c75ef443d8dba30aed7365a42ee0a /src | |
parent | 556ccd6d483b3678867c3829e6979c307df04450 (diff) | |
download | gnunet-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')
-rw-r--r-- | src/dht/test_dht_tools.py.in | 13 |
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 | ||
39 | tf, tempcfg = tempfile.mkstemp (prefix='test_dht_api_peer1.') | 39 | cfgfile = 'test_dht_api_peer1.conf' |
40 | os.close (tf) | 40 | |
41 | 41 | run_get = [get, '-c', cfgfile] | |
42 | run_get = [get, '-c', tempcfg] | 42 | run_put = [put, '-c', cfgfile] |
43 | run_put = [put, '-c', tempcfg] | 43 | run_arm = [arm, '-c', cfgfile] |
44 | run_arm = [arm, '-c', tempcfg] | ||
45 | debug = os.getenv ('DEBUG') | 44 | debug = os.getenv ('DEBUG') |
46 | if debug: | 45 | if debug: |
47 | run_arm += [debug.split (' ')] | 46 | run_arm += [debug.split (' ')] |
48 | 47 | ||
49 | def cleanup (exitcode): | 48 | def cleanup (exitcode): |
50 | os.remove (tempcfg) | ||
51 | sys.exit (exitcode) | 49 | sys.exit (exitcode) |
52 | 50 | ||
53 | def sub_run (args, want_stdo = True, want_stde = False, nofail = False): | 51 | def 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 | ||
107 | shutil.copyfile ('test_dht_api_peer1.conf', tempcfg) | ||
108 | 105 | ||
109 | print ("TEST: Starting ARM...", end='') | 106 | print ("TEST: Starting ARM...", end='') |
110 | r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False) | 107 | r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False) |