summaryrefslogtreecommitdiffstats
path: root/tests/yangre/all.tcl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-23 09:41:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-23 09:41:28 +0000
commit76ffd5ce84e4adb412833c8186fc6b26b656947f (patch)
tree11da7c12c05e9d2a85ec40022d43a970184bb867 /tests/yangre/all.tcl
parentInitial commit. (diff)
downloadlibyang3-upstream/3.1.0.tar.xz
libyang3-upstream/3.1.0.zip
Adding upstream version 3.1.0.upstream/3.1.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/yangre/all.tcl')
-rw-r--r--tests/yangre/all.tcl15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/yangre/all.tcl b/tests/yangre/all.tcl
new file mode 100644
index 0000000..f00563f
--- /dev/null
+++ b/tests/yangre/all.tcl
@@ -0,0 +1,15 @@
+package require tcltest
+
+# Hook to determine if any of the tests failed.
+# Sets a global variable exitCode to 1 if any test fails otherwise it is set to 0.
+proc tcltest::cleanupTestsHook {} {
+ variable numTests
+ set ::exitCode [expr {$numTests(Failed) > 0}]
+}
+
+if {[info exists ::env(TESTS_DIR)]} {
+ tcltest::configure -testdir "$env(TESTS_DIR)"
+}
+
+tcltest::runAllTests
+exit $exitCode