diff options
author | Willow Liquorice <willow@howhill.com> | 2022-08-29 22:01:18 +0100 |
---|---|---|
committer | Willow Liquorice <willow@howhill.com> | 2022-10-03 13:16:29 +0100 |
commit | 43b55e25e3824ea3bd9b4e10ee3dd2a5188b7f4c (patch) | |
tree | 8357efdb8fc09747562a1ae10d2f8e59f6a79623 /src/statistics/test_gnunet_statistics.py.in | |
parent | 4611664be0ba79ec7029a74cf961f28f2a658241 (diff) | |
download | gnunet-43b55e25e3824ea3bd9b4e10ee3dd2a5188b7f4c.tar.gz gnunet-43b55e25e3824ea3bd9b4e10ee3dd2a5188b7f4c.zip |
-Removed references to explicit /tmp in test scripts and configurations in DHT, GNS, STATISTICS, and TRANSPORT subsystems.
Diffstat (limited to 'src/statistics/test_gnunet_statistics.py.in')
-rw-r--r-- | src/statistics/test_gnunet_statistics.py.in | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/statistics/test_gnunet_statistics.py.in b/src/statistics/test_gnunet_statistics.py.in index ce277b13e..ad7e95bd1 100644 --- a/src/statistics/test_gnunet_statistics.py.in +++ b/src/statistics/test_gnunet_statistics.py.in | |||
@@ -7,6 +7,7 @@ import re | |||
7 | import subprocess | 7 | import subprocess |
8 | import time | 8 | import time |
9 | 9 | ||
10 | raw_tmp = True | ||
10 | if os.name == "nt": | 11 | if os.name == "nt": |
11 | tmp = os.getenv("TEMP") | 12 | tmp = os.getenv("TEMP") |
12 | elif None != os.environ.get("TMPDIR"): | 13 | elif None != os.environ.get("TMPDIR"): |
@@ -14,7 +15,9 @@ elif None != os.environ.get("TMPDIR"): | |||
14 | elif None != os.environ.get("TMP"): | 15 | elif None != os.environ.get("TMP"): |
15 | tmp = os.getenv("TMP") | 16 | tmp = os.getenv("TMP") |
16 | else: | 17 | else: |
17 | tmp = "/tmp" | 18 | raw_tmp = False |
19 | tmp = subprocess.check_output("gnunet-config -f -s PATHS -o GNUNET_TMP", | ||
20 | text=True) | ||
18 | 21 | ||
19 | if os.name == 'nt': | 22 | if os.name == 'nt': |
20 | st = './gnunet-statistics.exe' | 23 | st = './gnunet-statistics.exe' |
@@ -30,8 +33,14 @@ if debug: | |||
30 | run_arm += [debug.split(' ')] | 33 | run_arm += [debug.split(' ')] |
31 | 34 | ||
32 | 35 | ||
36 | if raw_tmp: | ||
37 | cleanup_path = "gnunet/test-gnunet-statistics" | ||
38 | else: | ||
39 | cleanup_path = "test-gnunet-statistics" | ||
40 | |||
41 | |||
33 | def cleanup(): | 42 | def cleanup(): |
34 | shutil.rmtree(os.path.join(tmp, "gnunet/test-gnunet-statistics"), True) | 43 | shutil.rmtree(os.path.join(tmp, cleanup_path), True) |
35 | 44 | ||
36 | 45 | ||
37 | def sub_run(args, want_stdo=True, want_stde=False, nofail=False): | 46 | def sub_run(args, want_stdo=True, want_stde=False, nofail=False): |