Skip to content

Commit c5d1a92

Browse files
authored
Run test for autogenerated config in subprocess (#47)
Only a single version of a dotnet-core runtime can be loaded at a given time. This off-loads one of our tests to a subprocess (the same pattern would work if we did this for the other test). Could be cleaner, but this will do for now.
1 parent 690a756 commit c5d1a92

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_common.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ def test_coreclr(example_netcore):
5757

5858

5959
def test_coreclr_autogenerated_runtimeconfig(example_netstandard):
60+
from multiprocessing import get_context
61+
62+
p = get_context("spawn").Process(
63+
target=_do_test_coreclr_autogenerated_runtimeconfig, args=(example_netstandard,)
64+
)
65+
p.start()
66+
p.join()
67+
p.close()
68+
69+
70+
def _do_test_coreclr_autogenerated_runtimeconfig(example_netstandard):
6071
from clr_loader import get_coreclr
6172

6273
coreclr = get_coreclr()

0 commit comments

Comments
 (0)