aboutsummaryrefslogtreecommitdiff
path: root/runner.go
diff options
context:
space:
mode:
Diffstat (limited to 'runner.go')
-rw-r--r--runner.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/runner.go b/runner.go
index 2f86d2e..11fceab 100644
--- a/runner.go
+++ b/runner.go
@@ -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
}