From 54ef397f1578ee8194c32bcf2d0a09f14afd9b64 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 26 Jun 2017 09:16:44 +0200 Subject: [PATCH] fix test failure introduced by latest configuration parser fix, avoid unnecessary copying around of the configuration file --- src/dht/test_dht_tools.py.in | 13 +++++-------- 1 file 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: put = './gnunet-dht-put' arm = 'gnunet-arm' -tf, tempcfg = tempfile.mkstemp (prefix='test_dht_api_peer1.') -os.close (tf) - -run_get = [get, '-c', tempcfg] -run_put = [put, '-c', tempcfg] -run_arm = [arm, '-c', tempcfg] +cfgfile = 'test_dht_api_peer1.conf' + +run_get = [get, '-c', cfgfile] +run_put = [put, '-c', cfgfile] +run_arm = [arm, '-c', cfgfile] debug = os.getenv ('DEBUG') if debug: run_arm += [debug.split (' ')] def cleanup (exitcode): - os.remove (tempcfg) sys.exit (exitcode) 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): print ("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format (command, stdo, stde)) cleanup (1) -shutil.copyfile ('test_dht_api_peer1.conf', tempcfg) print ("TEST: Starting ARM...", end='') r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False) -- 2.25.1