Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
geyslan committed Dec 4, 2024
1 parent 23044a1 commit 39122fb
Show file tree
Hide file tree
Showing 44 changed files with 1,103 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,35 @@ clean-signatures:
# other commands
#

# evt

EVT_SRC_DIRS = ./cmd/evt/
EVT_SRC = $(shell find $(EVT_SRC_DIRS) \
-type f \
-name '*.go' \
! -name '*_test.go' \
)

.PHONY: evt
evt: $(OUTPUT_DIR)/evt

$(OUTPUT_DIR)/evt: \
$(EVT_SRC) \
$(OUTPUT_DIR)/tracee \
| .eval_goenv \
.checkver_$(CMD_GO) \
#
$(GO_ENV_EBPF) $(CMD_GO) build \
-ldflags="$(GO_DEBUG_FLAG) \
" \
-v -o $@ \
./cmd/evt

.PHONY: clean-evt
clean-evt:
#
$(CMD_RM) -rf $(OUTPUT_DIR)/evt

# tracee-bench

TRACEE_BENCH_SRC_DIRS = ./cmd/tracee-bench/
Expand Down
38 changes: 38 additions & 0 deletions cmd/evt/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package cmd

import (
"os"

"github.com/spf13/cobra"

"github.com/aquasecurity/tracee/cmd/evt/cmd/stress"
"github.com/aquasecurity/tracee/cmd/evt/cmd/trigger"
)

func init() {
rootCmd.AddCommand(stress.Cmd())
rootCmd.AddCommand(trigger.Cmd())
}

var (
rootCmd = &cobra.Command{
Use: "evt",
Short: "An event stress testing tool",
Long: "evt is a simple testing tool that generates events to stress the system",
}
)

func initRootCmd() error {
rootCmd.SetOutput(os.Stdout)
rootCmd.SetErr(os.Stderr)

return nil
}

func Execute() error {
if err := initRootCmd(); err != nil {
return err
}

return rootCmd.Execute()
}
Loading

0 comments on commit 39122fb

Please sign in to comment.