Changeset 1851


Ignore:
Timestamp:
Mar 5, 2009, 1:43:13 PM (14 years ago)
Author:
Peter
Message:

adding test for --with-yat=no. refs #491

Location:
trunk/test
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/test/Makefile.am

    r1846 r1851  
    6767
    6868# tests not passing through yet
    69 XFAIL_TESTS =
     69XFAIL_TESTS = yat_m4_test2.sh
    7070
    7171TESTS += documentation_test.sh
    7272
    73 DISTRIBUTED_TESTS = yat_m4_test.sh
     73DISTRIBUTED_TESTS = yat_m4_test.sh yat_m4_test2.sh
    7474
    7575TESTS += $(DISTRIBUTED_TESTS)
  • trunk/test/common_defs.sh.in

    r1847 r1851  
    3434fi
    3535
    36 echo "Running $me"
     36echo "=== Running $me ==="
    3737
    3838# autotools are required, if not found exit 77 to skipt test
     
    6666AC_PROG_CXX
    6767AC_PROG_LIBTOOL
    68 YAT_CHECK_VERSION([0.5.99],,
    69                   [AC_MSG_ERROR([could not find required version of yat])])
    70 YAT_CHECK_HEADER(,[AC_MSG_ERROR([could not find yat headers])])
    71 YAT_LA_FILE=\`\$yat_config --link-libtool\`
    72 AC_SUBST(YAT_LA_FILE)
     68m4_include(acinclude.m4)
    7369AC_CONFIG_FILES([Makefile])
    7470AC_OUTPUT
     
    8783EOF
    8884$move_if_change Makefile.am.tmp Makefile.am
     85
     86echo "dnl a dummy include" > acinclude.m4
    8987
    9088echo "Create hello.cc"
  • trunk/test/yat_m4_test.sh

    r1842 r1851  
    2727. ./common_defs.sh || exit 1
    2828
     29echo "Create acinclude.m4.tmp"
     30cat > acinclude.m4.tmp <<EOF
     31YAT_CHECK_VERSION([0.5.99],,
     32                  [AC_MSG_ERROR([could not find required version of yat])])
     33YAT_CHECK_HEADER(,[AC_MSG_ERROR([could not find yat headers])])
     34YAT_LA_FILE=\`\$yat_config --link-libtool\`
     35AC_SUBST(YAT_LA_FILE)
     36EOF
     37$move_if_change acinclude.m4.tmp acinclude.m4
     38
    2939# bootstrapping
    30 test -f configure || \
    31   (autoreconf -sifv && \
    32    ./configure --with-yat=$abs_top_builddir/build_support/yat-config)
     40if test -f Makefile; then : else
     41  autoreconf -siv
     42  ./configure --with-yat=$abs_top_builddir/build_support/yat-config
     43fi
    3344
    3445# we always wanna relink
  • trunk/test/yat_m4_test2.sh

    r1845 r1851  
    2020
    2121
    22 # build a `hello world' project that uses macro YAT_CHECK_YAT in its
    23 # configure.ac. Test if the macro works against an uninstalled yat.
     22# test that option --with-yat=no works as expected.
    2423
    2524set -e
     
    2726. ./common_defs.sh || exit 1
    2827
     28cat > acinclude.m4 <<EOF
     29YAT_CHECK_YAT([2.7.8],,AC_MSG_ERROR([test failed - see warning above]))
     30YAT_FIND_YAT(,[AC_MSG_ERROR([test failed - see warning above])])
     31YAT_CHECK_VERSION([1.60.2],,[AC_MSG_ERROR([test failed - see warning above])])
     32YAT_CHECK_HEADER(,[AC_MSG_ERROR([test failed - see warning above])])
     33YAT_CHECK_LIB(,[AC_MSG_ERROR([test failed - see warning above])])
     34EOF
     35
    2936# bootstrapping
    30 test -f configure || \
    31   (autoreconf -sifv && \
    32    ./configure --with-yat=$abs_top_builddir/build_support/yat-config)
    33 
    34 # we always wanna relink
    35 rm -f hello
    36 make
    37 echo "running ./hello"
    38 ./hello || exit 1
     37autoreconf -siv && ./configure --with-yat=no
    3938
    4039echo "Test is OK"
Note: See TracChangeset for help on using the changeset viewer.