Skip to content

Commit

Permalink
Run test for autogenerated config in subprocess (#47)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
filmor authored Jan 3, 2023
1 parent 690a756 commit c5d1a92
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ def test_coreclr(example_netcore):


def test_coreclr_autogenerated_runtimeconfig(example_netstandard):
from multiprocessing import get_context

p = get_context("spawn").Process(
target=_do_test_coreclr_autogenerated_runtimeconfig, args=(example_netstandard,)
)
p.start()
p.join()
p.close()


def _do_test_coreclr_autogenerated_runtimeconfig(example_netstandard):
from clr_loader import get_coreclr

coreclr = get_coreclr()
Expand Down

0 comments on commit c5d1a92

Please sign in to comment.