From e2e645a6a06ac43501e8ffaceca05b2196aa60dc Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 6 Apr 2016 20:42:12 +0200 Subject: [PATCH] Added option to set the base folder for unittests from an environment variable --- Duplicati/UnitTest/BasicSetupHelper.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Duplicati/UnitTest/BasicSetupHelper.cs b/Duplicati/UnitTest/BasicSetupHelper.cs index bedb95553..e5ddd86b8 100644 --- a/Duplicati/UnitTest/BasicSetupHelper.cs +++ b/Duplicati/UnitTest/BasicSetupHelper.cs @@ -26,7 +26,10 @@ namespace Duplicati.UnitTest /// /// The base folder where all data is trashed around /// - protected static readonly string BASEFOLDER = Library.Utility.Utility.ExpandEnvironmentVariables(Path.Combine("~", "testdata")); + protected static readonly string BASEFOLDER = + string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("UNITTEST_BASEFOLDER")) + ? Library.Utility.Utility.ExpandEnvironmentVariables(Path.Combine("~", "testdata")) + : Environment.GetEnvironmentVariable("UNITTEST_BASEFOLDER"); /// /// The folder path that serves as the backup destination