diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-19 00:27:55 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-19 00:27:55 -0500 |
commit | 1d479733bcbeb630557cd07f721d4510e989934c (patch) | |
tree | 42422bd0c2ecc51869eceb8bbead8f5c3e58855f /runner.go | |
parent | 86d8789f065636779d3cecded363743b2a39bb47 (diff) | |
download | planr-master.tar.xz planr-master.zip |
Add list command, copy for bash command, and ability to run non-directory commands anywhereHEADv0.1.6master
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 } |