test_gnunet_statistics.py: use new locations of TMP
authorNils Gillmann <ng0@n0.is>
Sun, 6 May 2018 21:41:36 +0000 (21:41 +0000)
committerNils Gillmann <ng0@n0.is>
Sun, 6 May 2018 21:41:36 +0000 (21:41 +0000)
Signed-off-by: Nils Gillmann <ng0@n0.is>
src/statistics/test_gnunet_statistics.py.in

index 86d0258f413d7e2c3f1c772274e4471a9c8f36e8..8f6966b6f073ccabcb2377246262783fa086a1f5 100644 (file)
@@ -9,8 +9,12 @@ import time
 
 if os.name == "nt":
   tmp = os.getenv ("TEMP")
+elif os.environ["TMPDIR"]:
+    tmp = os.getenv("TMPDIR")
+elif os.environ["TMP"]:
+    tmp = os.getenv("TMP")
 else:
-  tmp = "/tmp"
+    tmp = "/tmp"
 
 if os.name == 'nt':
   st = './gnunet-statistics.exe'
@@ -26,7 +30,7 @@ if debug:
   run_arm += [debug.split (' ')]
 
 def cleanup ():
-  shutil.rmtree (os.path.join (tmp, "test-gnunet-statistics"), True)
+  shutil.rmtree (os.path.join (tmp, "gnunet/test-gnunet-statistics"), True)
 
 def sub_run (args, want_stdo = True, want_stde = False, nofail = False):
   if want_stdo: