summaryrefslogtreecommitdiffstats
path: root/tests/yanglint/non-interactive/all.tcl
blob: 998c03aec3b58338fe9f57ad80c669b69af03cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)/non-interactive"
}

tcltest::runAllTests
exit $exitCode