diff options
Diffstat (limited to 'runner.go')
-rw-r--r-- | runner.go | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -1,5 +1,9 @@ package planr +import ( + "fmt" +) + type Runner struct { adapters []Adapter } @@ -18,13 +22,8 @@ func (r Runner) adapterCfgs() []AdapterConfig { return cgs } -func (r Runner) collectUnits(root string) []TestCase { - tcs := make([]TestCase, 10) - - collectUnits(root, nil, r.adapterCfgs(), &tcs) - - return tcs -} +// [Initialization] -> [Generation] -> [Finalization] -> +// [Build] -> [Evaluation] -> [Clean] func (r Runner) cycle(tcs []TestCase) []TestResult { results := make([]TestResult, 0) @@ -36,14 +35,18 @@ func (r Runner) cycle(tcs []TestCase) []TestResult { for _, tc := range tcs { if tc.ContainsAdapter(aname) { + fmt.Printf("[R] Building %s\n", tc.Path) adapter.Build(tc) } } adapter.FinalizeBuild() + adapter.Make() + for _, tc := range tcs { if tc.ContainsAdapter(aname) { + fmt.Printf("[R] Evaluating %s\n", tc.Path) results = append(results, adapter.Evaluate(tc)) } } @@ -55,7 +58,7 @@ func (r Runner) cycle(tcs []TestCase) []TestResult { } func (r Runner) Run(root string) [] TestResult { - tcs := r.collectUnits(root) + tcs := collectUnits(root, r.adapterCfgs()) trs := r.cycle(tcs) |