Changeset 3825


Ignore:
Timestamp:
Jul 18, 2019, 8:21:25 AM (3 years ago)
Author:
Peter
Message:

closes #926

In tests call configure set CXX to the one found at configure time. In
some cases also set CPPFLAGS, CXXFLAGS and LDFLAGS. In general, if the
test configure script is using a c++ compiler, then we need to set CXX
except in some cases which uses g++ and these tests are skipped if g++
is not available (there's a possible hole there). If test is not
retrieving FLAGS from yat-config, directly or via yat.m4, then we set
the flags at commandline in the tests as the compiler might not run
without them.

Location:
trunk/test
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/defs.sh.in

    r3417 r3825  
    140140YAT_CONFIG=$abs_top_builddir/build_support/yat-config
    141141YAT_LDFLAGS="@YAT_LDFLAGS@"
     142CXX="@CXX@"
     143CPPFLAGS="@CPPFLAGS@"
     144CXXFLAGS="@CXXFLAGS@"
    142145LDFLAGS="@LDFLAGS@"
    143146HAVE_HTSLIB="@HAVE_HTSLIB@"
  • trunk/test/yat_header_assert_test.sh

    r3228 r3825  
    3838grep NDEBUG config.h.in || exit_fail
    3939
    40 run ./configure 0
     40run ./configure 0 CXX="$CXX"
    4141grep '#define NDEBUG 1' config.h || exit_fail
    4242
    43 run ./configure 0 --enable-assert
     43run ./configure 0 CXX="$CXX" --enable-assert
    4444test -s stderr && exit_fail
    4545grep '#define NDEBUG' config.h && exit_fail
  • trunk/test/yat_lt_compile_ifelse_test.sh

    r3113 r3825  
    5353# bootstrapping
    5454bootstrap
    55 ./configure $configure_opts || exit_fail
     55./configure "$my_FLAGS" $configure_opts || exit_fail
    5656
    5757# test that it works with --disable-static (see
    5858# http://dev.thep.lu.se/yat/ticket/737#comment:18)
    5959if x$enable_shared = xyes; then
    60   ./configure --disable-static || exit_fail
     60  ./configure "$my_FLAGS" --disable-static || exit_fail
    6161fi
    6262
  • trunk/test/yat_lt_link_ifelse_test.sh

    r3114 r3825  
    6868# bootstrapping
    6969bootstrap
    70 if ./configure $configure_opts --with-yat=$YAT_CONFIG; then
     70if ./configure CXX="$CXX" $configure_opts --with-yat=$YAT_CONFIG; then
    7171    echo OK;
    7272else
  • trunk/test/yat_lt_link_la_ifelse_test.sh

    r3130 r3825  
    5454
    5555bootstrap
    56 if ./configure $configure_opts; then
     56if ./configure "$my_FLAGS" $configure_opts; then
    5757    echo OK;
    5858else
  • trunk/test/yat_m4_test.sh

    r3112 r3825  
    4444
    4545bootstrap
    46 ./configure $configure_opts -C --with-yat=$YAT_CONFIG
     46./configure CXX="$CXX" $configure_opts -C --with-yat=$YAT_CONFIG
    4747
    4848make
    4949./hello || exit_fail
    5050
    51 ./configure $configure_opts -C --with-yat=$YAT_CONFIG > stdout
     51./configure CXX="$CXX" $configure_opts -C --with-yat=$YAT_CONFIG > stdout
    5252cat stdout
    5353grep yat stdout
  • trunk/test/yat_m4_test2.sh

    r3114 r3825  
    4343
    4444bootstrap
    45 ./configure $configure_opts --without-yat
     45./configure CXX="$CXX" $configure_opts --without-yat
    4646make Makefile
    4747
  • trunk/test/yat_m4_with_bam_test.sh

    r3661 r3825  
    4040bootstrap
    4141grep '^YAT_CHECK_LIB_WITH_BAM' configure && exit_fail
    42 if ./configure $configure_opts --with-yat=$YAT_CONFIG; then :;
     42if ./configure CXX="$CXX" $configure_opts --with-yat=$YAT_CONFIG; then :;
    4343else
    4444warn_ configure failed unexpectedly
  • trunk/test/yat_msg_error_test.sh

    r3330 r3825  
    4545bootstrap
    4646rm -f config.status
    47 run ./configure 1 $configure_opts
     47run ./configure 1 "$my_FLAGS" $configure_opts
    4848grep "$specific_msg" stderr || exit_fail
    4949grep "$specific_msg" config.log || exit_fail
  • trunk/test/yat_revision_header_test.sh

    r3114 r3825  
    6363grep '\.revision' my.am && exit_fail
    6464
    65 ./configure $configure_opts || exit_fail
     65./configure "$my_FLAGS" $configure_opts || exit_fail
    6666make check VERBOSE=1 || exit_fail
    6767
Note: See TracChangeset for help on using the changeset viewer.