• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

trento-project / agent / 15966794902

30 Jun 2025 07:36AM UTC coverage: 72.758% (-0.2%) from 72.926%
15966794902

push

github

web-flow
Bump workbench reference to latest updates (#454)

4455 of 6123 relevant lines covered (72.76%)

19.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/pkg/utils/commandexecutor.go
1
package utils
2

3
import (
4
        "context"
5
        "fmt"
6
        "os/exec"
7
        "syscall"
8
)
9

10
type CommandExecutor interface {
11
        Exec(name string, arg ...string) ([]byte, error)
12
        ExecContext(ctx context.Context, name string, arg ...string) ([]byte, error)
13
}
14

15
type Executor struct{}
16

17
func (e Executor) Exec(name string, arg ...string) ([]byte, error) {
2✔
18
        cmd := exec.Command(name, arg...)
2✔
19

2✔
20
        return cmd.Output()
2✔
21
}
2✔
22

23
func (e Executor) ExecContext(ctx context.Context, name string, arg ...string) ([]byte, error) {
4✔
24
        cmd := exec.CommandContext(ctx, name, arg...)
4✔
25
        cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
4✔
26
        cmd.Cancel = func() error {
5✔
27
                err := syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
1✔
28
                if err != nil {
1✔
29
                        return fmt.Errorf("error killing process group: %w", err)
×
30
                }
×
31
                return nil
1✔
32
        }
33
        return cmd.Output()
4✔
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc