summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-04 15:38:30 -0500
committerFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-04 15:38:30 -0500
commitcc7ba659adbc5ad55e1ce67f76952f2b8392c9c9 (patch)
tree2df3f62bd4dcda45732b0955f2797596f0ae5743 /cmd
parentb3252d2bd488b5b58cf0e46151ff9db0721c5fc6 (diff)
downloaddeb-planr-cc7ba659adbc5ad55e1ce67f76952f2b8392c9c9.tar.xz
deb-planr-cc7ba659adbc5ad55e1ce67f76952f2b8392c9c9.zip
Refactor build/eval pipeline to use clearer IO model and adapter segmentation methods
Diffstat (limited to 'cmd')
-rw-r--r--cmd/planr/main.go2
-rw-r--r--cmd/planr/sub/build.go3
-rw-r--r--cmd/planr/sub/evaluate.go3
3 files changed, 5 insertions, 3 deletions
diff --git a/cmd/planr/main.go b/cmd/planr/main.go
index b2a0975..4ff57eb 100644
--- a/cmd/planr/main.go
+++ b/cmd/planr/main.go
@@ -29,7 +29,7 @@ func dieUsage() {
func getConfiguredRunner() planr.Runner {
r := planr.ConfigureRunner()
- r = planr.RegisterAdapter(r, gtest.New())
+ r = planr.RegisterAdapter(r, gtest.NewAdapter())
if wd, err := os.Getwd(); err == nil {
r = planr.SetConfigDirFromTree(r, wd)
diff --git a/cmd/planr/sub/build.go b/cmd/planr/sub/build.go
index 4a1cda9..d24bb02 100644
--- a/cmd/planr/sub/build.go
+++ b/cmd/planr/sub/build.go
@@ -6,5 +6,6 @@ import (
func Build(runner planr.Runner, params []string) {
- runner.Build()
+ tcs := runner.CollectCases()
+ runner.Build(tcs)
}
diff --git a/cmd/planr/sub/evaluate.go b/cmd/planr/sub/evaluate.go
index 79d377e..0366d44 100644
--- a/cmd/planr/sub/evaluate.go
+++ b/cmd/planr/sub/evaluate.go
@@ -5,7 +5,8 @@ import (
)
func Evaluate(runner planr.Runner, params []string) {
- tcs := runner.Evaluate()
+ tcs := runner.CollectCases()
+ tcs = runner.Evaluate(tcs)
earned := 0.0
total := 0.0