aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2021-08-12 17:42:11 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2021-08-12 20:24:38 +0200
commit3fd2ea69e05557e7e0fef9b68263b4150670671c (patch)
tree2e2a3a05ee6e20956af2494d7b29287853d5062f /pkg
parentc551a195ab9f048106bb50a33521eda7a6027280 (diff)
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.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/report/linux_test.go5
1 files changed, 5 insertions, 0 deletions
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 {