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
9 changes: 9 additions & 0 deletions ginkgo/testrunner/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
type TestRunner struct {
Suite testsuite.TestSuite

noTestFiles bool
compiled bool
compilationTargetPath string

Expand Down Expand Up @@ -156,6 +157,11 @@ func (t *TestRunner) CompileTo(path string) error {
fmt.Println(string(output))
}

if bytes.Contains(output, []byte("[no test files]")) {
t.noTestFiles = true
return nil
}

if fileExists(path) == false {
compiledFile := t.Suite.PackageName + ".test"
if fileExists(compiledFile) {
Expand Down Expand Up @@ -229,6 +235,9 @@ func copyFile(src, dst string) error {
}

func (t *TestRunner) Run() RunResult {
if t.noTestFiles {
return PassingRunResult()
}
if t.Suite.IsGinkgo {
if t.numCPU > 1 {
if t.parallelStream {
Expand Down