summaryrefslogtreecommitdiff
path: root/adapters.go
diff options
context:
space:
mode:
authorFlu0r1ne <flur01ne@flu0r1ne.net>2021-08-03 02:02:40 -0500
committerFlu0r1ne <flur01ne@flu0r1ne.net>2021-08-03 02:02:40 -0500
commita0b020a78eb0b33965c59460fc093c6959216e44 (patch)
tree3b2722388ea6b312e927b6066b0831524ba4ed6b /adapters.go
downloaddeb-planr-a0b020a78eb0b33965c59460fc093c6959216e44.tar.xz
deb-planr-a0b020a78eb0b33965c59460fc093c6959216e44.zip
Initial commit with basic build structure
Diffstat (limited to 'adapters.go')
-rw-r--r--adapters.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/adapters.go b/adapters.go
new file mode 100644
index 0000000..b9c8d9c
--- /dev/null
+++ b/adapters.go
@@ -0,0 +1,26 @@
+package planr
+
+// Test adapters must implement all life cycle hooks
+// This allows common config, code generation, etc
+// Test cases matching adapter configurations will be
+// fed into the adapter interface
+type Adapter interface {
+
+ /* CONFIGURATION HOOKS */
+
+ Config() AdapterConfig
+
+ /* BUILD CYCLE */
+
+ // Called once at the beginning of the build process
+ InitializeBuild()
+ // Called once with every registered test case
+ // Can access configuration directly
+ Build(testCase TestCase)
+ // Called once after all builds
+ FinalizeBuild()
+ // Called once per test case after FinalizeBuild
+ Evaluate(testCase TestCase) TestResult
+ // Called once after each test has been evaluated
+ Cleanup()
+}