1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-11 18:20:26 +09:00

[tests] In test wrapper scripts if -debug is gdb or lldb, add separator before corerun and args (#60416)

* [tests] If -debug is LLDB, add separator before corerun and args

   For runtime test shell scripts, if a debugger is specified with `-debug=/usr/bin/lddb` or the like, add a separator so that `lldb` doesn't try to interpret `-p` as a PID argument.

   Also update mono workflow doc

* Also support gdb as the debugger
This commit is contained in:
Aleksey Kliger (λgeek) 2021-10-20 10:17:54 -04:00 committed by GitHub
parent bab98261ed
commit 72bcf2f77a
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View file

@ -39,20 +39,12 @@ make run-tests-coreclr-all
To debug a single test with `lldb`:
1. Run the test at least once normally (or manually run the `mono.proj` `PatchCoreClrCoreRoot` target)
2. Edit the `.sh` file for the test and change the line
```
LAUNCHER="$_DebuggerFullPath "$CORE_ROOT/corerun" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" ${__DotEnvArg}"
```
to add `--` after the debugger full path
```
LAUNCHER="$_DebuggerFullPath -- "$CORE_ROOT/corerun" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" ${__DotEnvArg}"
```
3. Run the shell script for the test case manually:
2. Run the shell script for the test case manually:
```
bash ./artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh -coreroot=`pwd`/artifacts/tests/coreclr/OSX.x64.Release/Tests/Core_Root -debug=/usr/bin/lldb
```
4. In LLDB add the debug symbols for mono: `add-dsym <CORE_ROOT>/libcoreclr.dylib.dwarf`
5. Run/debug the test
3. In LLDB add the debug symbols for mono: `add-dsym <CORE_ROOT>/libcoreclr.dylib.dwarf`
4. Run/debug the test
### WebAssembly:
Build the runtime tests for WebAssembly

View file

@ -306,11 +306,20 @@ $__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreApp
<![CDATA[
$(BashLinkerTestLaunchCmds)
_DebuggerArgsSeparator=
if [[ "$_DebuggerFullPath" == *lldb* ]];
then
_DebuggerArgsSeparator=--
elif [[ "$_DebuggerFullPath" == *gdb* ]]
then
_DebuggerArgsSeparator=--args
fi
if [ ! -z "$CLRCustomTestLauncher" ];
then
LAUNCHER="$CLRCustomTestLauncher $PWD/"
else
LAUNCHER="$_DebuggerFullPath $(CLRTestRunFile)"
LAUNCHER="$_DebuggerFullPath $_DebuggerArgsSeparator $(CLRTestRunFile)"
fi
$(BashIlrtTestLaunchCmds)