7 test -z "$UGIT" && ERROR
=1
10 echo "ugit must be in your path in order to call run_tests directly."
13 BINDIR
=$
(dirname $UGIT)
14 PREFIX
=$
(dirname $BINDIR)
15 PYTHONPATH
="$PREFIX"/share
:"$PREFIX"/share
/ugit
:"$PYTHONPATH"
19 for unittest
in t
[0-9]*.py
; do
23 if [ $?
-ne 0 ] && [ -z "$RUN_ALL" ]; then
24 echo "$unittest failed with exit code $?"
31 use Time::HiRes qw(gettimeofday);
33 my ($start_sec, $start_ms) = gettimeofday();
39 if ( /(\d+) tests/ ) {
42 elsif ( /(.*) failed/ ) {
47 my ($end_sec, $end_ms) = gettimeofday();
50 my $sec = $end_sec - $start_sec;
51 my $secfrac = ( $end_ms - $start_ms ) * 100;
53 while ( $secfrac < 0.0 ) {
54 $secfrac += 1000 * 100;
57 $secfrac = substr("$secfrac", 0, 2);
66 print "The following test FAILED:\n";
68 print join("\n\t", @fail);
73 print `../scripts/gitversion.sh`;
75 print "$count tests total\n";
76 print "$min min $sec.$secfrac sec total runtime\n\n";