Skip to content

Commit ac877c2

Browse files
committed
Add python version and arch to the domain test
... folder names.
1 parent eedbae5 commit ac877c2

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/domain_tests/TestRunner.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,10 +952,17 @@ public static int Main(string[] args)
952952
Console.WriteLine($"-- Looking for domain reload test case {testName}");
953953
testCase = Cases.First(c => c.Name == testName);
954954
}
955+
string pyVersion = null;
956+
string pyArch = null;
957+
if (args.Length == 3)
958+
{
959+
pyVersion = args[1];
960+
pyArch = args[2];
961+
}
955962

956963
Console.WriteLine($"-- Running domain reload test case: {testCase.Name}");
957964

958-
SetupTestFolder(testCase.Name);
965+
SetupTestFolder(testCase.Name, pyVersion, pyArch);
959966

960967
CreatePythonModule(testCase);
961968
{
@@ -993,9 +1000,9 @@ public static int Main(string[] args)
9931000
return 0;
9941001
}
9951002

996-
static void SetupTestFolder(string testCaseName)
1003+
static void SetupTestFolder(string testCaseName, string pyVersion, string arch)
9971004
{
998-
TestPath = Path.Combine(Path.GetTempPath(), $"Python.TestRunner.{testCaseName}");
1005+
TestPath = Path.Combine(Path.GetTempPath(), $"Python.TestRunner.{testCaseName}-{pyVersion}-{arch}");
9991006
if (Directory.Exists(TestPath))
10001007
{
10011008
Directory.Delete(TestPath, recursive: true);

src/domain_tests/test_domain_reload.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import subprocess
22
import os
33
import platform
4+
import sys
45

56
import pytest
67

78
def _run_test(testname):
89
dirname = os.path.split(__file__)[0]
910
exename = os.path.join(dirname, 'bin', 'Python.DomainReloadTests.exe')
10-
args = [exename, testname]
11+
pyversion = "py" + platform.python_version()
12+
if sys.maxsize > 2 ** 32:
13+
arch = "amd64"
14+
else:
15+
arch = "x86"
16+
17+
args = [exename, testname, pyversion, arch]
1118

1219
if platform.system() != 'Windows':
1320
args = ['mono'] + args

0 commit comments

Comments
 (0)