Skip to content

Commit ae30643

Browse files
committed
test file only for linux
1 parent 0132fb3 commit ae30643

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

agent/agentexec/cli_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func CLI(args []string, environ []string) error {
5353
}
5454
}
5555

56-
err = syscall.Setpriority(syscall.PRIO_PROCESS, 0, nice)
56+
err = unix.Setpriority(unix.PRIO_PROCESS, 0, nice)
5757
if err != nil {
5858
return xerrors.Errorf("set nice score: %w", err)
5959
}

agent/agentexec/cli_test.go renamed to agent/agentexec/cli_unix_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build linux
2+
// +build linux
3+
14
package agentexec_test
25

36
import (
@@ -7,7 +10,6 @@ import (
710
"os"
811
"os/exec"
912
"path/filepath"
10-
"runtime"
1113
"strconv"
1214
"strings"
1315
"syscall"
@@ -23,10 +25,6 @@ import (
2325
func TestCLI(t *testing.T) {
2426
t.Parallel()
2527

26-
if runtime.GOOS != "linux" {
27-
t.Skip("tests only valid on linux")
28-
}
29-
3028
t.Run("OK", func(t *testing.T) {
3129
t.Parallel()
3230

0 commit comments

Comments
 (0)