Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion internal/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type flagsTests struct {
Random bool `default:"false" flag:"random" info:"Use the random flag to execute test cases randomly"`
Seed int64 `default:"0" flag:"seed" info:"Use the seed flag to manipulate random execution of test cases"`
Name string `default:"" flag:"name" info:"Use the name flag to run only tests that match the given name"`
BaseDir string `default:"" flag:"base-dir" info:"Directory to search for test files (defaults to current directory)"`

// Fork mode flags
Fork string // Use definition in init()
Expand Down Expand Up @@ -130,8 +131,12 @@ func run(

var filenames []string
if len(args) == 0 {
baseDir := "."
if testFlags.BaseDir != "" {
baseDir = testFlags.BaseDir
}
var err error
filenames, err = findAllTestFiles(".")
filenames, err = findAllTestFiles(baseDir)
if err != nil {
return nil, fmt.Errorf("error loading script files: %w", err)
}
Expand Down
Loading