From: Simon Nattress Date: Thu, 19 Nov 2020 23:16:41 +0000 (-0800) Subject: Move xunit test harness to its own directory under core_root (#44921) X-Git-Tag: submit/tizen/20210909.063632~4508 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=705533ec2adcadf6a994be0e9cca714c415d4d4a;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Move xunit test harness to its own directory under core_root (#44921) Running `xunit.console` from within the CoreRoot directory is problematic. It is executed by the shared runtime but has a full copy of the runtime and framework libraries next to it from which assemblies are getting loaded despite being for a pre-release test runtime. Place the xunit assemblies under `/xunit` and update the places that invoke it in local and Helix test runs. The loaded tests do reference the xunit assemblies so they need to also be available in core_root for when the tests run (with the exception of the harness specific assemblies like xunit.console). --- diff --git a/src/tests/Common/Directory.Build.targets b/src/tests/Common/Directory.Build.targets index 46ce59e..d8a6dc3 100644 --- a/src/tests/Common/Directory.Build.targets +++ b/src/tests/Common/Directory.Build.targets @@ -41,6 +41,7 @@ + @@ -84,6 +85,9 @@ True + + + diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index cdebbe1..ad82766 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -182,7 +182,7 @@ <_XUnitConsoleRunnerFiles Include="$(NuGetPackageRoot)$(MicrosoftDotNetXUnitConsoleRunnerPackage)\$(MicrosoftDotNetXUnitConsoleRunnerVersion)\**\xunit.console.*" /> - + @@ -289,11 +289,11 @@ - %CORE_ROOT%\xunit.console.dll + %CORE_ROOT%\xunit\xunit.console.dll - $CORE_ROOT/xunit.console.dll + $CORE_ROOT/xunit/xunit.console.dll diff --git a/src/tests/Common/tests.targets b/src/tests/Common/tests.targets index 606775a..639d08a 100644 --- a/src/tests/Common/tests.targets +++ b/src/tests/Common/tests.targets @@ -41,7 +41,7 @@ - $(CORE_ROOT)\xunit.console.dll + $(CORE_ROOT)\xunit\xunit.console.dll -parallel none -parallel $(ParallelRun) diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index a6a8d2d..802b7d4 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -275,6 +275,7 @@ + @@ -315,6 +316,9 @@ True + + + diff --git a/src/tests/run.py b/src/tests/run.py index 6c12a84..f710345 100755 --- a/src/tests/run.py +++ b/src/tests/run.py @@ -984,7 +984,7 @@ def run_tests(args, urlretrieve(url, zipfilename) with zipfile.ZipFile(zipfilename,"r") as ziparch: - ziparch.extractall(args.core_root) + ziparch.extractall(os.path.join(args.core_root, "xunit")) os.remove(zipfilename) assert not os.path.isfile(zipfilename)