Changeset 2520
- Timestamp:
- Jul 11, 2011, 5:55:27 PM (12 years ago)
- Location:
- trunk/test
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/common_defs.sh.in
r2519 r2520 40 40 run () 41 41 { 42 test $# -ge 2 || exit 142 test $# -ge 2 || exit_fatal 43 43 foo_prog=$1 44 44 shift … … 49 49 cat stderr >&2 50 50 cat stdout 51 test $exitcode = $expected_exitcode || exit 151 test $exitcode = $expected_exitcode || Exit 1 52 52 } 53 53 -
trunk/test/help_test.sh
r2458 r2520 24 24 set -e 25 25 26 . ./common_defs.sh || exit 126 . ./common_defs.sh || exit 99 27 27 28 28 run ../../help.test 0 --nonsense --help 29 test -s stderr && exit 130 grep 'Usage:' stdout || exit 129 test -s stderr && exit_fail 30 grep 'Usage:' stdout || exit_fail 31 31 32 32 run ../../help.test 0 -nonsense --help 33 test -s stderr && exit 134 grep 'Usage:' stdout || exit 133 test -s stderr && exit_fail 34 grep 'Usage:' stdout || exit_fail 35 35 36 36 run ../../help.test 0 nonsense --help 37 test -s stderr && exit 138 grep 'Usage:' stdout || exit 137 test -s stderr && exit_fail 38 grep 'Usage:' stdout || exit_fail 39 39 40 40 run ../../help.test 1 --help-me 41 test -s stderr || exit 142 grep 'help.test:.*help-me' stderr || exit 141 test -s stderr || exit_fail 42 grep 'help.test:.*help-me' stderr || exit_fail 43 43 44 exit 044 exit_success -
trunk/test/static_test.sh
r2244 r2520 26 26 set -e 27 27 28 . ./common_defs.sh || exit 128 . ./common_defs.sh || exit 99 29 29 30 30 cat >> configure.ac <<EOF … … 46 46 47 47 make 48 ./hello || exit 1 49 50 echo "Test is OK" 48 ./hello || exit_fail -
trunk/test/yat_config_cblas_test.sh
r2384 r2520 26 26 set -e 27 27 28 . ./common_defs.sh || exit 128 . ./common_defs.sh || exit 99 29 29 30 30 export YAT_CBLAS_LIB=BOGUSBOGUS 31 31 ret_str=`$abs_top_builddir/build_support/yat-config --libs` 32 echo $ret_str | grep BOGUSBOGUS || exit 133 exit 032 echo $ret_str | grep BOGUSBOGUS || exit_fail 33 exit_success -
trunk/test/yat_config_test.sh
r2473 r2520 26 26 set -e 27 27 28 . ./common_defs.sh || exit 128 . ./common_defs.sh || exit 99 29 29 30 30 prog=${abs_top_builddir}/build_support/for_installation/yat-config … … 32 32 for opt in --version --help; do 33 33 run sh 0 $prog ${opt} 34 test -s stderr && exit 135 test -s stdout || exit 134 test -s stderr && exit_fail 35 test -s stdout || exit_fail 36 36 done 37 37 38 grep '^installed=yes' ${prog} || exit 138 grep '^installed=yes' ${prog} || exit_fail 39 39 40 40 run sh 1 $prog --nonsense 41 grep 'yat-config:.*--nonsense' stderr || exit 142 grep 'for more information' stderr || exit 141 grep 'yat-config:.*--nonsense' stderr || exit_fail 42 grep 'for more information' stderr || exit_fail 43 43 44 exit 0 44 -
trunk/test/yat_cpp_add_flag_test.sh
r2384 r2520 27 27 set -e 28 28 29 . ./common_defs.sh || exit 129 . ./common_defs.sh || exit 99 30 30 31 31 cat >> configure.ac <<EOF … … 42 42 ./configure CXX=g++ 43 43 44 grep 'YAT_CPPFLAGS__' Makefile 44 grep 'YAT_CPPFLAGS__' Makefile || exit_fail 45 grep 'YAT_CPPFLAGS__.*HAVE_SOMETHING' Makefile || exit_fail 46 grep 'YAT_CPPFLAGS__.*SOMETHING.*SOMETHING' Makefile && exit_fail 47 grep 'YAT_CPPFLAGS__.*usr/' Makefile && exit_fail "found usr/" 45 48 46 if test `grep 'YAT_CPPFLAGS__.*HAVE_SOMETHING' Makefile | wc -l` = 1; then 47 echo "found HAVE_SOMETHING" 48 else 49 echo "ERROR: found no HAVE_SOMETHING" 50 exit 1 51 fi 52 53 if test `grep 'YAT_CPPFLAGS__.*SOMETHING.*SOMETHING' Makefile|wc -l` = 0; 54 then 55 : 56 else 57 echo "ERROR: found double HAVE_SOMETHING" 58 exit 1 59 fi 60 61 if test `grep 'YAT_CPPFLAGS__.*usr/' Makefile | wc -l` = 0; then 62 echo "found no usr/" 63 else 64 echo "ERROR: found usr/" 65 exit 1 66 fi 67 68 69 echo "Test is OK" 49 exit_success -
trunk/test/yat_cxx_add_flag_test.sh
r2384 r2520 27 27 set -e 28 28 29 . ./common_defs.sh || exit 129 . ./common_defs.sh || exit 99 30 30 31 31 cat >> configure.ac <<EOF … … 42 42 grep 'YAT_CXXFLAGS__' Makefile 43 43 44 if test `grep 'YAT_CXXFLAGS__.*SOMETHING' Makefile | wc -l` = 1; then 45 echo "found SOMETHING" 46 else 47 echo "ERROR: found no SOMETHING" 48 exit 1 49 fi 44 grep 'YAT_CXXFLAGS__.*SOMETHING' Makefile || exit_fail found no SOMETHING 50 45 51 46 if test `grep 'YAT_CXXFLAGS__.*SOMETHING.*SOMETHING' Makefile | wc -l` = 0; then -
trunk/test/yat_ld_add_flag_test.sh
r2384 r2520 20 20 21 21 22 # test that YAT_ CPP_ADD_FLAG adds the passed flag and ignores standard22 # test that YAT_LD_ADD_FLAG adds the passed flag and ignores standard 23 23 # includes like `-L/usr/lib' and `-L/usr/local/lib' 24 24 … … 27 27 set -e 28 28 29 . ./common_defs.sh || exit 129 . ./common_defs.sh || exit 99 30 30 31 31 cat >> configure.ac <<EOF … … 42 42 ./configure CXX=g++ 43 43 44 grep 'YAT_LDFLAGS__' Makefile 44 grep 'YAT_LDFLAGS__' Makefile || exit_fail 45 grep 'YAT_LDFLAGS__.*opt' Makefile || exit_fail np opt 46 grep 'YAT_LDFLAGS__.*opt.*opt' Makefile && exit_fail found double opt 47 grep 'YAT_LDFLAGS__.*usr/' Makefile && exit_fail found usr/ 45 48 46 if test `grep 'YAT_LDFLAGS__.*opt' Makefile | wc -l` = 1; then 47 echo "found opt" 48 else 49 echo "ERROR: found no opt" 50 exit 1 51 fi 52 53 if test `grep 'YAT_LDFLAGS__.*opt.*opt' Makefile|wc -l` = 0; 54 then 55 : 56 else 57 echo "ERROR: found double opt" 58 exit 1 59 fi 60 61 if test `grep 'YAT_LDFLAGS__.*usr/' Makefile | wc -l` = 0; then 62 echo "found no usr/" 63 else 64 echo "ERROR: found usr/" 65 exit 1 66 fi 67 68 69 echo "Test is OK" 49 exit_success -
trunk/test/yat_lt_link_ifelse_test.sh
r2451 r2520 27 27 set -e 28 28 29 . ./common_defs.sh || exit 129 . ./common_defs.sh || exit 99 30 30 31 31 cat >> configure.ac <<EOF … … 72 72 else 73 73 tail -n 500 config.log; 74 exit 1;74 exit_fail configure failed; 75 75 fi 76 76 77 grep test_result Makefile || exit 177 grep test_result Makefile || exit_fail -
trunk/test/yat_m4_test.sh
r2494 r2520 27 27 set -e 28 28 29 . ./common_defs.sh || exit 129 . ./common_defs.sh || exit 99 30 30 31 31 cat >> configure.ac <<EOF … … 45 45 46 46 make 47 ./hello || exit 147 ./hello || exit_fail 48 48 49 echo "Test is OK" -
trunk/test/yat_m4_test2.sh
r2384 r2520 26 26 set -e 27 27 28 . ./common_defs.sh || exit 128 . ./common_defs.sh || exit 99 29 29 30 30 cat >> configure.ac <<EOF … … 43 43 make Makefile 44 44 45 echo "Test is OK" 45 -
trunk/test/yat_msg_error_test.sh
r2495 r2520 26 26 set -e 27 27 28 . ./common_defs.sh || exit 128 . ./common_defs.sh || exit 99 29 29 30 30 specific_msg='some specific message a51965' … … 48 48 bootstrap 49 49 rm -f config.status 50 exitcode=0 51 ./configure > stdout 2> stderr || exitcode=$? 52 cat stdout 53 cat stderr >&2 54 test $exitcode = 0 && exit 1 55 grep "$specific_msg" stderr || exit 1 56 grep "$specific_msg" config.log || exit 1 50 run ./configure 1 51 grep "$specific_msg" stderr || exit_fail 52 grep "$specific_msg" config.log || exit_fail 57 53 58 54 # configure should abort before config.status creates Makefile 59 test -f Makefile && exit 155 test -f Makefile && exit_fail 60 56 61 grep 'for something more' stdout || exit 1 62 63 echo "Test is OK" 57 grep 'for something more' stdout || exit_fail -
trunk/test/yat_msg_error_test2.sh
r2495 r2520 44 44 bootstrap 45 45 rm -f config.status 46 exitcode=0 47 ./configure > stdout 2> stderr || exitcode=$? 48 cat stdout 49 cat stderr >&2 50 test $exitcode = 0 || exit 1 46 run ./configure 0 51 47 52 echo "Test is OK"
Note: See TracChangeset
for help on using the changeset viewer.