diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2019-01-23 22:59:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 22:59:27 +0100 |
commit | 70e7fa10827d039dcf2f3c59284da85eac02ac09 (patch) | |
tree | fbd682b70751e0a99f5dad2eef42fe43ff08634a /tests/scripts | |
parent | a0f81f59a7beb7120d3147c1547ef8ec1f05e0ae (diff) | |
download | coreclr-70e7fa10827d039dcf2f3c59284da85eac02ac09.tar.gz coreclr-70e7fa10827d039dcf2f3c59284da85eac02ac09.tar.bz2 coreclr-70e7fa10827d039dcf2f3c59284da85eac02ac09.zip |
Add unloadability testing tool (#22064)
* Add unloadability testing tool
This change adds the unloadability testing tool that can be used to run
coreclr tests or any other .NET core app inside of unloadable
AssemblyLoadContext, unload it after its execution completes and verify
that the unload succeeded. It has also various additional testing
options:
* memory leak testing
* running multiple iterations of the load/run/unload sequence
* optional breaking into debugger at various interesting stages (before
executing the test assembly, after executing it, on unload failure)
* delegated load when the AssemblyLoadContext that loads the test
assembly delegates loading of all the dependencies to another
AssemblyLoadContext
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/runincontext.cmd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/scripts/runincontext.cmd b/tests/scripts/runincontext.cmd new file mode 100644 index 0000000000..5b1d70cc85 --- /dev/null +++ b/tests/scripts/runincontext.cmd @@ -0,0 +1,16 @@ +@rem This script is a bridge that allows .cmd files of individual tests to run the respective test executables +@rem in an unloadable AssemblyLoadContext. +@rem +@rem To use this script, set the CLRCustomTestLauncher environment variable to the full path of this script. +@rem +@rem Additional command line arguments can be passed to the runincontext tool by setting the RunInContextExtraArgs +@rem environment variable +@rem +@rem The .cmd files of the individual tests will call this script to launch the test. +@rem This script gets the following arguments +@rem 1. Full path to the directory of the test binaries (the test .cmd file is in there) +@rem 2. Filename of the test executable +@rem 3. - n. Additional arguments that were passed to the test .cmd + +set CORE_LIBRARIES=%1 +%_DebuggerFullPath% "%CORE_ROOT%\corerun.exe" "%CORE_ROOT%\..\..\runincontext\runincontext\runincontext.exe" %RunInContextExtraArgs% /referencespath:%CORE_ROOT%\ %1%2 %3 %4 %5 %6 %7 %8 %9 |