Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae30643

Browse files
committed
test file only for linux
1 parent0132fb3 commitae30643

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
iferr!=nil {
5858
returnxerrors.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
funcTestCLI(t*testing.T) {
2426
t.Parallel()
2527

26-
ifruntime.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)

[8]ページ先頭

©2009-2025 Movatter.jp