Skip to content

Commit

Permalink
reduces not needed diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
M4tteoP committed Nov 11, 2023
1 parent 3a4cb51 commit a9b334f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runner/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func RunTest(runContext *TestRunContext, ftwTest test.FTWTest) error {

for _, testCase := range ftwTest.Tests {
// if we received a particular testid, skip until we find it
if needToSkipTest(runContext.Include, runContext.Exclude, testCase.TestTitle, ftwTest.Meta.Enabled) {
if needToSkipTest(runContext.Include, runContext.Exclude, testCase.TestTitle, *ftwTest.Meta.Enabled) {
runContext.Stats.addResultToStats(Skipped, testCase.TestTitle, 0)
if !*ftwTest.Meta.Enabled && !runContext.ShowOnlyFailed {
runContext.Output.Println("\tskipping %s - (enabled: false) in file.", testCase.TestTitle)
Expand Down Expand Up @@ -240,9 +240,9 @@ func markAndFlush(runContext *TestRunContext, dest *ftwhttp.Destination, stageID
return nil, fmt.Errorf("can't find log marker. Am I reading the correct log? Log file: %s", runContext.Config.LogFile)
}

func needToSkipTest(include *regexp.Regexp, exclude *regexp.Regexp, title string, enabled *bool) bool {
func needToSkipTest(include *regexp.Regexp, exclude *regexp.Regexp, title string, enabled bool) bool {
// skip disabled tests
if enabled != nil && !*enabled {
if !enabled {
return true
}

Expand Down

0 comments on commit a9b334f

Please sign in to comment.