summaryrefslogtreecommitdiff
path: root/addons/gut/hook_script.gd
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-10-03 22:22:50 +0200
committerSophia Pearson <codergal89@gmail.com>2022-10-04 22:18:18 +0200
commite127ad39e742396030352240d829bc903b1d4464 (patch)
tree10cc21d70bf13181aef7c8ad0344077ff63579a3 /addons/gut/hook_script.gd
parentddbb045f6387a8ba23b1210b27a745516a387a52 (diff)
downloadtexty-e127ad39e742396030352240d829bc903b1d4464.tar.xz
texty-e127ad39e742396030352240d829bc903b1d4464.zip
godot: inital Godot 4 migration
Diffstat (limited to 'addons/gut/hook_script.gd')
-rw-r--r--addons/gut/hook_script.gd41
1 files changed, 0 insertions, 41 deletions
diff --git a/addons/gut/hook_script.gd b/addons/gut/hook_script.gd
deleted file mode 100644
index 2efc3b1..0000000
--- a/addons/gut/hook_script.gd
+++ /dev/null
@@ -1,41 +0,0 @@
-class_name GutHookScript
-# ------------------------------------------------------------------------------
-# This script is the base for custom scripts to be used in pre and post
-# run hooks.
-#
-# To use, inherit from this script and then implement the run method.
-# ------------------------------------------------------------------------------
-var JunitXmlExport = load('res://addons/gut/junit_xml_export.gd')
-
-# This is the instance of GUT that is running the tests. You can get
-# information about the run from this object. This is set by GUT when the
-# script is instantiated.
-var gut = null
-
-# the exit code to be used by gut_cmdln. See set method.
-var _exit_code = null
-
-var _should_abort = false
-
-# Virtual method that will be called by GUT after instantiating
-# this script.
-func run():
- gut.get_logger().error("Run method not overloaded. Create a 'run()' method in your hook script to run your code.")
-
-
-# Set the exit code when running from the command line. If not set then the
-# default exit code will be returned (0 when no tests fail, 1 when any tests
-# fail).
-func set_exit_code(code):
- _exit_code = code
-
-func get_exit_code():
- return _exit_code
-
-# Usable by pre-run script to cause the run to end AFTER the run() method
-# finishes. post-run script will not be ran.
-func abort():
- _should_abort = true
-
-func should_abort():
- return _should_abort