set scriptDir [file normalize [file join [file dirname [info script]] ".."]]
set auto_path [linsert $auto_path 0 $scriptDir]

set bits [expr $tcl_platform(pointerSize) * 8]
puts "Using Tcl version  : [info patchlevel] (${bits}-bit)"
puts "Using Tk  version  : [package require Tk] (${bits}-bit)"
puts "Using poFti version: [package require poFti]"

package require tcltest

# Hook to determine if any of the tests failed.
# Then we can exit with proper exit code.
proc tcltest::cleanupTestsHook {} {
    variable numTests

    set ::exitCode [expr {$numTests(Failed) > 0}]
}

::tcltest::configure -testdir [file dirname [file normalize [info script]]]
::tcltest::configure {*}$argv

::tcltest::runAllTests

exit $exitCode

