From f0ed4a71e1c93a6f22b9067b85db3e2fce90c36f Mon Sep 17 00:00:00 2001 From: Alessandro Arzilli Date: Mon, 8 Mar 2021 18:35:56 +0100 Subject: [PATCH] Continuous Integration cleanup (#2369) - remove github workflow for testing macOS/amd64 that is now covered by TeamCity - fix DeepSource glob patterns to actually match what they are intended to match (did the interpretation change?) - disable some cgo tests on darwin/arm64 --- .deepsource.toml | 2 +- .github/workflows/test.yml | 18 ------------------ Documentation/backend_test_health.md | 2 ++ pkg/proc/proc_test.go | 4 ++++ service/test/integration1_test.go | 3 +++ service/test/integration2_test.go | 3 +++ service/test/variables_test.go | 4 ++++ 7 files changed, 17 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.deepsource.toml b/.deepsource.toml index 6889372d..5f2b68ef 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -2,7 +2,7 @@ version = 1 test_patterns = ["**/*_test.go"] -exclude_patterns = ["vendor", "_fixtures", "_scripts"] +exclude_patterns = ["vendor/**", "_fixtures/**", "_scripts/**"] [[analyzers]] name = "go" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 1e94da3b..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Delve CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - include: - - go: 1.15 - os: macos-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v1 - with: - go-version: ${{matrix.go}} - - run: go run _scripts/make.go test diff --git a/Documentation/backend_test_health.md b/Documentation/backend_test_health.md index 400a9588..279ac095 100644 --- a/Documentation/backend_test_health.md +++ b/Documentation/backend_test_health.md @@ -7,6 +7,8 @@ Tests skipped by each supported backend: * 2 broken * 1 broken - cgo stacktraces * 1 broken - global variable symbolication +* darwin/arm64 skipped = 0.68% (1/148) + * 1 broken - cgo stacktraces * darwin/lldb skipped = 0.68% (1/148) * 1 upstream issue * freebsd skipped = 8.1% (12/148) diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index 7d3593b2..02fada29 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -837,6 +837,8 @@ func TestCGONext(t *testing.T) { } protest.MustHaveCgo(t) + skipOn(t, "broken - cgo stacktraces", "darwin", "arm64") + protest.AllowRecording(t) withTestProcess("cgotest", t, func(p *proc.Target, fixture protest.Fixture) { setFunctionBreakpoint(p, t, "main.main") @@ -943,6 +945,8 @@ func stackMatch(stack []loc, locations []proc.Stackframe, skipRuntime bool) bool } func TestStacktraceGoroutine(t *testing.T) { + skipOn(t, "broken - cgo stacktraces", "darwin", "arm64") + mainStack := []loc{{14, "main.stacktraceme"}, {29, "main.main"}} if goversion.VersionAfterOrEqual(runtime.Version(), 1, 11) { mainStack[0].line = 15 diff --git a/service/test/integration1_test.go b/service/test/integration1_test.go index 3cb3a995..bde8f9fd 100644 --- a/service/test/integration1_test.go +++ b/service/test/integration1_test.go @@ -716,6 +716,9 @@ func Test1ClientServer_SetVariable(t *testing.T) { } func Test1ClientServer_FullStacktrace(t *testing.T) { + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + t.Skip("cgo doesn't work on darwin/arm64") + } withTestClient1("goroutinestackprog", t, func(c *rpc1.RPCClient) { _, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.stacktraceme", Line: -1}) assertNoError(err, t, "CreateBreakpoint()") diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go index 5cab11d8..270b1bd7 100644 --- a/service/test/integration2_test.go +++ b/service/test/integration2_test.go @@ -911,6 +911,9 @@ func TestClientServer_SetVariable(t *testing.T) { func TestClientServer_FullStacktrace(t *testing.T) { protest.AllowRecording(t) + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + t.Skip("cgo doesn't work on darwin/arm64") + } withTestClient2("goroutinestackprog", t, func(c service.Client) { _, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.stacktraceme", Line: -1}) assertNoError(err, t, "CreateBreakpoint()") diff --git a/service/test/variables_test.go b/service/test/variables_test.go index 64ec5dc9..baea4fa9 100644 --- a/service/test/variables_test.go +++ b/service/test/variables_test.go @@ -1564,6 +1564,10 @@ func TestCgoEval(t *testing.T) { {"v_align_check[90]", false, "align_check {a: 90, b: 90}", "align_check {a: 90, b: 90}", "align_check", nil}, } + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + t.Skip("cgo doesn't work on darwin/arm64") + } + protest.AllowRecording(t) withTestProcess("testvariablescgo/", t, func(p *proc.Target, fixture protest.Fixture) { assertNoError(p.Continue(), t, "Continue() returned an error")