From 1bb0ca011ded2864d674b840491e5fa946cdde37 Mon Sep 17 00:00:00 2001 From: Jim Nicholson Date: Sun, 11 Feb 2024 21:48:03 -0800 Subject: [PATCH] Add framework for a test stage --- vars/testStage.groovy | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 vars/testStage.groovy diff --git a/vars/testStage.groovy b/vars/testStage.groovy new file mode 100644 index 0000000..f338c4c --- /dev/null +++ b/vars/testStage.groovy @@ -0,0 +1,14 @@ +#!/usr/bin/env groovy + +void call(Map config = [:], Closure body = { }) { + Map defaults = [ + testRequires: 'Makefile', + testCmd: 'make all', + stepName: 'Test' + ] + runConfig = defaults + config + stage(runConfig.stepName) { + printBanner(runConfig.stepName) + body() + } +}