From 4c8b719d9fcb5c67b4f461961d436532cbd4c8c1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 10 May 2018 12:03:13 +0200 Subject: [PATCH] fix test check for TMPDIR: do not throw exception if variable does not exist --- contrib/no_autostart_above_core.conf | 3 +++ contrib/no_forcestart.conf | 5 ++++- src/statistics/test_gnunet_statistics.py.in | 6 +++--- src/statistics/test_statistics_api_data.conf | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/no_autostart_above_core.conf b/contrib/no_autostart_above_core.conf index 81c01898f..7bcf6c8ae 100644 --- a/contrib/no_autostart_above_core.conf +++ b/contrib/no_autostart_above_core.conf @@ -85,3 +85,6 @@ AUTOSTART = NO [sensor] AUTOSTART = NO + +[zonemaster-monitor] +AUTOSTART = NO diff --git a/contrib/no_forcestart.conf b/contrib/no_forcestart.conf index e21187ed2..a332d6da7 100644 --- a/contrib/no_forcestart.conf +++ b/contrib/no_forcestart.conf @@ -35,4 +35,7 @@ FORCESTART = NO FORCESTART = NO [zonemaster] -FORCESTART = NO \ No newline at end of file +FORCESTART = NO + +[zonemaster-monitor] +FORCESTART = NO diff --git a/src/statistics/test_gnunet_statistics.py.in b/src/statistics/test_gnunet_statistics.py.in index 8f6966b6f..96714cf9a 100644 --- a/src/statistics/test_gnunet_statistics.py.in +++ b/src/statistics/test_gnunet_statistics.py.in @@ -8,10 +8,10 @@ import subprocess import time if os.name == "nt": - tmp = os.getenv ("TEMP") -elif os.environ["TMPDIR"]: + tmp = os.getenv ("TEMP") +elif None != os.environ.get("TMPDIR"): tmp = os.getenv("TMPDIR") -elif os.environ["TMP"]: +elif None != os.environ.get("TMP"): tmp = os.getenv("TMP") else: tmp = "/tmp" diff --git a/src/statistics/test_statistics_api_data.conf b/src/statistics/test_statistics_api_data.conf index 66555291c..9ef8d0673 100644 --- a/src/statistics/test_statistics_api_data.conf +++ b/src/statistics/test_statistics_api_data.conf @@ -1,5 +1,5 @@ @INLINE@ ../../contrib/no_forcestart.conf +@INLINE@ ../../contrib/no_autostart_above_core.conf [PATHS] GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-statistics/ - -- 2.25.1