Ignore:
Timestamp:
Nov 12, 2012 4:55:25 PM (7 years ago)
Author:
bradbell
Message:
  1. cmake: Define check_* targets that build & run tests for each directory.
  2. move run_cmake.sh to check_all.sh.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/bin/check_all.sh

    r2562 r2564  
    1111# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1212# -----------------------------------------------------------------------------
    13 if [ ! -e "bin/run_cmake.sh" ]
    14 then
    15         echo "bin/run_cmake.sh: must be executed from its parent directory"
     13if [ ! -e "bin/check_all.sh" ]
     14then
     15        echo "bin/check_all.sh: must be executed from its parent directory"
    1616        exit 1
    1717fi
     
    2121}
    2222echo_exec_log() {
    23         echo "$* >> run_cmake.log"
    24         echo    >> $top_srcdir/run_cmake.log
    25         eval $* >> $top_srcdir/run_cmake.log
     23        echo "$* >> check_all.log"
     24        echo    >> $top_srcdir/check_all.log
     25        eval $* >> $top_srcdir/check_all.log
    2626}
    2727# circular shift program list and set program to first entry in list
     
    3030        program=`echo "$program_list" | sed -e 's| *\([^ ]*\).*|\1|'`
    3131}
    32 if [ -e 'run_cmake.log' ]
    33 then
    34         echo_exec rm run_cmake.log
     32if [ -e 'check_all.log' ]
     33then
     34        echo_exec rm check_all.log
    3535fi
    3636top_srcdir=`pwd`
     
    4242                cmake_args="$cmake_args  -DCMAKE_VERBOSE_MAKEFILE=1"
    4343        else
    44                 echo 'usage: bin/run_cmake.sh: [--verbose]'
     44                echo 'usage: bin/check_all.sh: [--verbose]'
    4545                exit 1
    4646        fi
     
    5555# -----------------------------------------------------------------------------
    5656list="
    57         run_cmake.log
     57        check_all.log
    5858        $HOME/prefix/cppad
    5959        work
     
    106106#
    107107echo_exec_log cmake .. $cmake_args
    108 echo_exec_log make all
     108# -----------------------------------------------------------------------------
     109echo_exec_log make check
    109110# -----------------------------------------------------------------------------
    110111skip=''
     
    190191        then
    191192                rm junk.1.$$ junk.2.$$
    192                 echo "print_for: OK"  >> $top_srcdir/run_cmake.log
    193         else
    194                 echo "print_for: Error"  >> $top_srcdir/run_cmake.log
     193                echo "print_for: OK"  >> $top_srcdir/check_all.log
     194        else
     195                echo "print_for: Error"  >> $top_srcdir/check_all.log
    195196                exit 1
    196197        fi
     
    201202if [ "$skip" != '' ]
    202203then
    203         echo "run_cmake.sh: skip = $skip"
     204        echo "check_all.sh: skip = $skip"
    204205        exit 1
    205206fi
    206207#
    207 echo 'run_cmake.sh: OK'
     208echo 'check_all.sh: OK'
    208209exit 0
Note: See TracChangeset for help on using the changeset viewer.