#!/bin/sh # establish variations # func_to_use=${1:-fail} top=`pwd` if [ "${top}" = "/" ] ; then top="" fi configure_test=${top}/configure # create autoconf input file if it doesnt exist # if [ ! -f configure.ac ] ; then echo "*** CREATE configure.ac ***" ( cat << EOF AC_PREREQ(2.57) AC_INIT([expr-configure],[1.5.11-1],[cygwin at cygwin dot com]) # for the purpose of this test, getting here is a success exit 0 EOF ) > configure.ac ; fi # create configure script if it doesnt exist # if [ ! -f configure ] ; then echo "*** GENERATE configure ***" autoconf fi # declare functions which pass and fail # pass () { ${configure_test} -n \ --target=i386-rtems \ --host=i686-pc-cygwin \ --build=i686-pc-cygwin \ build_alias=i686-pc-cygwin \ host_alias=i686-pc-cygwin \ target_alias=i386-rtems \ --cache-file=/dev/null } fail () { # strace -o strace_$$.log --mask=minimal \ ${configure_test} -n \ --target=i386-rtems \ --enable-rtemsbsp=386pc \ --host=i686-pc-cygwin \ --build=i686-pc-cygwin \ build_alias=i686-pc-cygwin \ host_alias=i686-pc-cygwin \ target_alias=i386-rtems \ --cache-file=/dev/null } # declare maintenance functions # clean () { set -x rm -rf *.log *.cache touch .stop set +x } dist-clean () { set -x clean rm -f configure configure.ac touch .stop set +x } # begin iterations # echo "Running using function $func_to_use()..." iter=0 while [ ! -f ${top}/.stop ] && echo "*** TEST ${iter} ***" ; do if ! $func_to_use > ./fail.log 2>&1 ; then break ; fi iter=`expr $iter + 1`; done if [ -f ${top}/.stop ] ; then echo "*** STOP ***" ; else echo "*** TEST ${iter} FAILS ***" tail ./fail.log fi rm -f .stop exit 1