summaryrefslogtreecommitdiff
path: root/hscript/script.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-12 09:28:39 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-12 09:28:39 -0500
commit6a2bbf81ae81a409565f55a825d330cd63772087 (patch)
tree760b41d60ab068bdf2905586a7ba0d8854ae71c9 /hscript/script.cc
parent90397f6a91e3e960609952486707ec76b332465e (diff)
downloadhorizon-6a2bbf81ae81a409565f55a825d330cd63772087.tar.gz
horizon-6a2bbf81ae81a409565f55a825d330cd63772087.tar.bz2
horizon-6a2bbf81ae81a409565f55a825d330cd63772087.tar.xz
horizon-6a2bbf81ae81a409565f55a825d330cd63772087.zip
hscript: Add Script::execute() and Simulate option
Diffstat (limited to 'hscript/script.cc')
-rw-r--r--hscript/script.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/hscript/script.cc b/hscript/script.cc
index 9edf0cc..a31fbc3 100644
--- a/hscript/script.cc
+++ b/hscript/script.cc
@@ -378,4 +378,21 @@ bool Script::validate() const {
return (failures == 0);
}
+bool Script::execute() const {
+ bool success;
+
+ /* Runner.Execute.Verify */
+ output_step_start("validate");
+ success = this->validate();
+ output_step_end("validate");
+ if(!success) {
+ /* Runner.Execute.Verify.Failure */
+ output_error("validator", "The HorizonScript failed validation.",
+ "Check the output from the validator.");
+ return false;
+ }
+
+ return false;
+}
+
}