xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/tcltk/tcl/run-ptest (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/sh
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun# clock.test needs a timezone to be set
4*4882a593Smuzhiyunexport TZ="Europe/London"
5*4882a593Smuzhiyunexport TCL_LIBRARY=library
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunfor i in `ls tests/*.test | awk -F/ '{print $2}'`; do
8*4882a593Smuzhiyun    ./tcltest tests/all.tcl -file $i >$i.log 2>&1
9*4882a593Smuzhiyun    grep -q -F -e "Files with failing tests:" -e "Test files exiting with errors:" $i.log
10*4882a593Smuzhiyun    if [ $? -eq 0 ]; then
11*4882a593Smuzhiyun        echo "FAIL: $i"
12*4882a593Smuzhiyun        cat $i.log
13*4882a593Smuzhiyun    else
14*4882a593Smuzhiyun        echo "PASS: $i"
15*4882a593Smuzhiyun    fi
16*4882a593Smuzhiyun    rm -f $i.log
17*4882a593Smuzhiyundone
18