Skip to content

Commit be8d538

Browse files
committed
Update test config paths
1 parent ab1a56e commit be8d538

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

test/WebJobs.Script.Tests.Integration/WebHostEndToEnd/CSharpPrecompiledTestFixture.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ namespace Microsoft.Azure.WebJobs.Script.Tests.Integration.WebHostEndToEnd
66
{
77
public class CSharpPrecompiledEndToEndTestFixture : EndToEndTestFixture
88
{
9-
#if DEBUG
10-
private const string TestPathTemplate = "..\\..\\{0}\\debug";
11-
#elif RELEASE
12-
private const string TestPathTemplate = "..\\..\\{0}\\release";
13-
#endif
9+
private const string TestPathTemplate = "..\\..\\{0}\\{{1}}";
1410

1511
private readonly IDisposable _dispose;
1612

1713
public CSharpPrecompiledEndToEndTestFixture(string testProjectName, IDictionary<string, string> envVars = null, string functionWorkerRuntime = "dotnet")
18-
: base(string.Format(TestPathTemplate, testProjectName), testProjectName, functionWorkerRuntime)
14+
: base(string.Format(TestPathTemplate, testProjectName, TestHelpers.BuildConfig), testProjectName, functionWorkerRuntime)
1915
{
2016
if (envVars != null)
2117
{

test/WebJobs.Script.Tests.Integration/WebHostEndToEnd/HostProcessLauncher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public HostProcessLauncher(
4040
bool usePublishPath = false)
4141
{
4242
string template = usePublishPath ? PublishPathTemplate : BuildPathTemplate;
43-
_testPath = Path.GetFullPath(string.Format(template, testProjectName, "debug"));
43+
_testPath = Path.GetFullPath(string.Format(template, testProjectName, TestHelpers.BuildConfig));
4444
_envVars = envVars ?? new Dictionary<string, string>();
4545
}
4646

test/WebJobs.Script.Tests.Shared/TestHelpers.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ namespace Microsoft.Azure.WebJobs.Script.Tests
3232
{
3333
public static partial class TestHelpers
3434
{
35+
#if DEBUG
36+
public const string BuildConfig = "debug";
37+
#else
38+
public const string BuildConfig = "release";
39+
#endif
40+
3541
private const string Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
3642
private static readonly Random Random = new Random();
3743

0 commit comments

Comments
 (0)