Skip to content

Commit

Permalink
Add macOS-x64 testing
Browse files Browse the repository at this point in the history
This PR adds PR tests on macOS-x64
  • Loading branch information
WardenGnaw committed Jul 20, 2021
1 parent 7aa7bda commit d66868a
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 8 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
which gdb
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
# TODO: Try to make core dumps work
# Related CoreDump Tests: https://github.com/microsoft/MIEngine/issues/1170
# echo 1 | sudo tee /proc/sys/kernel/core_uses_pid
# ulimit -S -c unlimited
# sudo sysctl -w kernel.core_pattern=${{ github.workspace }}/core.%e
Expand Down Expand Up @@ -150,4 +151,24 @@ jobs:
run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln

- run: |
${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
- name: Download LLDB-MI
run: |
# Download the latest version of lldb-ui that vscode-cpptools uses.
curl https://download.visualstudio.microsoft.com/download/pr/173e6ced-0717-401d-87fc-169ca3424c72/f1228fd847c140b7f9839612f497bb7a/lldb-mi-10.0.0.zip --output ${{ github.workspace }}/lldb-mi-10.0.0.zip
unzip ${{ github.workspace }}/lldb-mi-10.0.0.zip
# Ensure we can run it or we will get permission denied.
sudo chmod 755 /Users/runner/work/MIEngine/MIEngine/debugAdapters/lldb-mi/bin/lldb-mi
- run: |
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll
- name: 'Upload Test Results'
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: osx_x64_results
path: ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx
23 changes: 23 additions & 0 deletions test/CppTests/TestConfigurations/config_lldb.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<TestMachineConfiguration>
<TestConfigurations>
<TestConfiguration
Compiler="Clang"
DebuggeeArchitecture="x64"
Debugger="Lldb" />
</TestConfigurations>
<Compilers>
<Compiler
Name="Clang"
Type="ClangPlusPlus"
Path="/usr/bin/clang++" />
</Compilers>
<Debuggers>
<!-- By not specifying the Path, LLDB that ships with the extension will be used. -->
<Debugger
Name="Lldb"
Type="Lldb"
MIMode="lldb"
Path="/Users/runner/work/MIEngine/MIEngine/debugAdapters/lldb-mi/bin/lldb-mi" />
</Debuggers>
</TestMachineConfiguration>
6 changes: 4 additions & 2 deletions test/CppTests/Tests/BreakpointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ public void FunctionBreakpointsBasic(ITestSettings settings)
[Theory]
[DependsOnTest(nameof(CompileKitchenSinkForBreakpointTests))]
[RequiresTestSettings]
// TODO: Re-enable for Gdb_Gnu
[UnsupportedDebugger(SupportedDebugger.Gdb_Gnu | SupportedDebugger.Gdb_Cygwin | SupportedDebugger.Gdb_MinGW, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - gdb_gnu
// - lldb
[UnsupportedDebugger(SupportedDebugger.Lldb | SupportedDebugger.Gdb_Gnu | SupportedDebugger.Gdb_Cygwin | SupportedDebugger.Gdb_MinGW, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
public void RunModeBreakpoints(ITestSettings settings)
{
this.TestPurpose("Tests setting breakpoints while in run mode");
Expand Down
9 changes: 6 additions & 3 deletions test/CppTests/Tests/CoreDumpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public CoreDumpTests(ITestOutputHelper outputHelper) : base(outputHelper)
[Theory]
[RequiresTestSettings]
[SupportedPlatform(SupportedPlatform.Linux, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
// TODO: Re-enable for Gdb_Gnu
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - gdb_gnu
[UnsupportedDebugger(SupportedDebugger.Gdb_Gnu, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
public void CoreDumpBasic(ITestSettings settings)
{
Expand All @@ -68,7 +69,8 @@ public void CoreDumpBasic(ITestSettings settings)
[Theory]
[RequiresTestSettings]
[SupportedPlatform(SupportedPlatform.Linux, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
// TODO: Re-enable for Gdb_Gnu
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - gdb_gnu
[UnsupportedDebugger(SupportedDebugger.Gdb_Gnu, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
public void CoreDumpBasicMismatchedSourceAndSymbols(ITestSettings settings)
{
Expand All @@ -88,7 +90,8 @@ public void CoreDumpBasicMismatchedSourceAndSymbols(ITestSettings settings)
[Theory]
[RequiresTestSettings]
[SupportedPlatform(SupportedPlatform.Linux, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
// TODO: Re-enable for Gdb_Gnu
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - gdb_gnu
[UnsupportedDebugger(SupportedDebugger.Gdb_Gnu, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
public void CoreDumpVerifyActions(ITestSettings settings)
{
Expand Down
6 changes: 6 additions & 0 deletions test/CppTests/Tests/ExpressionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ public void DataTipBasic(ITestSettings settings)

[Theory]
[DependsOnTest(nameof(CompileKitchenSinkForExpressionTests))]
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - lldb
[UnsupportedDebugger(SupportedDebugger.Lldb, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
[RequiresTestSettings]
public void CallStackBasic(ITestSettings settings)
{
Expand Down Expand Up @@ -328,6 +331,9 @@ public void EvaluateOnFrames(ITestSettings settings)

[Theory]
[DependsOnTest(nameof(CompileKitchenSinkForExpressionTests))]
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - lldb
[UnsupportedDebugger(SupportedDebugger.Lldb, SupportedArchitecture.x64 | SupportedArchitecture.x86)]
[RequiresTestSettings]
public void EvaluateInvalidExpression(ITestSettings settings)
{
Expand Down
8 changes: 6 additions & 2 deletions test/CppTests/Tests/SharedLibTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public void CompileSharedLibDebuggee(ITestSettings settings)

[Theory]
[DependsOnTest(nameof(CompileSharedLibDebuggee))]
[UnsupportedDebugger(SupportedDebugger.VsDbg, SupportedArchitecture.x86 | SupportedArchitecture.x64)]
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - lldb
[UnsupportedDebugger(SupportedDebugger.VsDbg | SupportedDebugger.Lldb, SupportedArchitecture.x86 | SupportedArchitecture.x64)]
[RequiresTestSettings]
public void SharedLibBasic(ITestSettings settings)
{
Expand All @@ -66,7 +68,9 @@ public void SharedLibBasic(ITestSettings settings)
}

[Theory]
[UnsupportedDebugger(SupportedDebugger.VsDbg, SupportedArchitecture.x86 | SupportedArchitecture.x64)]
// TODO: https://github.com/microsoft/MIEngine/issues/1170
// - lldb
[UnsupportedDebugger(SupportedDebugger.VsDbg | SupportedDebugger.Lldb, SupportedArchitecture.x86 | SupportedArchitecture.x64)]
[RequiresTestSettings]
public void SharedLibMismatchSourceAndSymbols(ITestSettings settings)
{
Expand Down

0 comments on commit d66868a

Please sign in to comment.