Skip to content

Use separate test directories per framework#983

Merged
slozier merged 3 commits intoIronLanguages:masterfrom
BCSharp:test_dir_frmwrk
Nov 15, 2020
Merged

Use separate test directories per framework#983
slozier merged 3 commits intoIronLanguages:masterfrom
BCSharp:test_dir_frmwrk

Conversation

@BCSharp
Copy link
Copy Markdown
Member

@BCSharp BCSharp commented Oct 14, 2020

This is instead marking test_dynamic_regressions NotParallelSafe. Probably helps in other places too.

Comment thread Src/IronPython/Lib/iptest/ipunittest.py Outdated

def setUp(self):
self._temporary_dir = os.path.join(self.temp_dir, "IronPython")
self._temporary_dir = os.path.join(self.temp_dir, "IronPythonTest", clr.TargetFramework.translate(str.maketrans(" ,=", "_--")))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clr.TargetFramework is probably fine. My only thought is if we ever produce an IronPython.dll assembly which is not in sync with the exe (e.g. if we made a net5.0 exe for testing that references the netcoreapp3.1 assemblies) then the whole thing breaks down... Although I wonder if we could just run the netcoreapp3.1 exe using the .NET 5 runtime without producing a different assembly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My attitude is that we'll fix it when we get there. The whole framework detection logic is pretty complex and hard to guess in advance for future frameworks. For the scenarios you describe test_env will most likely have to be updated. We will need something like is_net50. Maybe then we can define a dedicated, platform-unique variable that can replace clr.TargetFramework.

The good news is that in the worst case two of the frameworks will share the same test directory, which is easily noticeable and still better than what we have today.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break running the tests with CPython (clr not defined).

@slozier slozier merged commit fd11855 into IronLanguages:master Nov 15, 2020
@BCSharp BCSharp deleted the test_dir_frmwrk branch November 16, 2020 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants