diff options
Diffstat (limited to 'runner.go')
-rw-r--r-- | runner.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -92,6 +92,10 @@ func (r Runner) CollectCases() []TestCase { } func (r Runner) Build(tcs []TestCase) { + wd, err := os.Getwd() + if err != nil { + log.Fatal(err) + } if !directoryExists(r.dirs.Build()) { r.dirs.MkBuild() @@ -107,9 +111,16 @@ func (r Runner) Build(tcs []TestCase) { adapter.Build(cases) } + + safeCd(wd) } func (r Runner) Evaluate(tcs []TestCase) []TestResult { + wd, err := os.Getwd() + if err != nil { + log.Fatal(err) + } + testSets := r.groupByAdapter(tcs) results := make([]TestResult, 0) @@ -131,7 +142,7 @@ func (r Runner) Evaluate(tcs []TestCase) []TestResult { sort.Sort(ByReadIdx(results)) - safeCd(r.dirs.Config()) + safeCd(wd) return results } |