From: Christian Grothoff Date: Mon, 26 Jun 2017 07:16:44 +0000 (+0200) Subject: fix test failure introduced by latest configuration parser fix, avoid unnecessary... X-Git-Tag: gnunet-0.11.0rc0~205 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=54ef397f1578ee8194c32bcf2d0a09f14afd9b64;p=oweals%2Fgnunet.git fix test failure introduced by latest configuration parser fix, avoid unnecessary copying around of the configuration file --- 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)