From 3fd2ea69e05557e7e0fef9b68263b4150670671c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 12 Aug 2021 17:42:11 +0000 Subject: pkg/report: run objdump-related tests only under Linux Restrict TestDisassemblyInReports from running on OSes other than Linux, as the exact resulting disassembly is dependent on that. --- pkg/report/linux_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/report/linux_test.go') diff --git a/pkg/report/linux_test.go b/pkg/report/linux_test.go index 005155943..ec5eb3c71 100644 --- a/pkg/report/linux_test.go +++ b/pkg/report/linux_test.go @@ -9,6 +9,7 @@ import ( "io/ioutil" "path/filepath" "reflect" + "runtime" "strings" "testing" @@ -374,6 +375,10 @@ func TestParseLinuxOpcodes(t *testing.T) { } func TestDisassemblyInReports(t *testing.T) { + if runtime.GOOS != targets.Linux { + t.Skipf("the test is meant to be run only under Linux") + } + archPath := filepath.Join("testdata", "linux", "decompile") subFolders, err := ioutil.ReadDir(archPath) if err != nil { -- cgit mrf-deployment