Skip to content

Commit

Permalink
debug linux
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Oct 10, 2024
1 parent 39c647b commit 78ffe3a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
27 changes: 13 additions & 14 deletions .buildkite/x-pack/pipeline.xpack.agentbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ steps:
# - agentbeat-package-linux
command: |
cd x-pack/agentbeat
ls -la ../../agentbeat-9.0.0-SNAPSHOT-linux-x86_64
mage -v testWithSpec
agents:
provider: "gcp"
Expand All @@ -120,21 +119,21 @@ steps:
disk_size: 100
disk_type: "pd-ssd"

- label: ":linux: Agentbeat/Integration tests Windows"
key: "agentbeat-it-windows"
env:
PLATFORM: "windows/amd64"
# - label: ":linux: Agentbeat/Integration tests Windows"
# key: "agentbeat-it-windows"
# env:
# PLATFORM: "windows/amd64"
# depends_on:
# - agentbeat-package-linux
command: |
cd x-pack/agentbeat
mage -v testWithSpec
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 200
disk_type: "pd-ssd"
# command: |
# cd x-pack/agentbeat
# mage -v testWithSpec
# agents:
# provider: "gcp"
# image: "${IMAGE_WIN_2022}"
# machine_type: "${GCP_WIN_MACHINE_TYPE}"
# disk_size: 200
# disk_type: "pd-ssd"
#
# - label: ":linux: Agentbeat/Integration tests macOS"
# key: "agentbeat-it-macos"
Expand Down
13 changes: 6 additions & 7 deletions x-pack/agentbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,9 @@ func TestWithSpec(ctx context.Context) {
}

hasFailures := false
for cmd, res := range cmdResults {
for _, res := range cmdResults {
if !res {
fmt.Printf("~~~ Failed: [%s]\n", cmd)
fmt.Print(res)
//fmt.Printf(":bangbang: Failed: [%s]\n", cmd)
hasFailures = true
}
}
Expand All @@ -255,17 +254,17 @@ func TestWithSpec(ctx context.Context) {

func agentbeatCmd(agentbeatPath string, command string) bool {
cmd := exec.Command(agentbeatPath, command)
fmt.Printf("Running command: %v\n", cmd)
fmt.Printf("--- Running command: %s\n", cmd.String())

if err := cmd.Start(); err != nil {
fmt.Printf("failed to start command: %v\n", err)
fmt.Printf(" failed to start command: %v\n", err)
}

defer func() {
if err := cmd.Process.Kill(); err != nil {
fmt.Printf("failed to kill process: %v\n", err)
fmt.Printf(":bangbang: failed to kill process: %v\n", err)
} else {
fmt.Print("command process killed\n")
fmt.Print(":large_green_circle: command process killed\n")
}
}()

Expand Down

0 comments on commit 78ffe3a

Please sign in to comment.