source: trunk/test_more/test_one.sh.in @ 1558

Last change on this file since 1558 was 1524, checked in by bradbell, 11 years ago

trunk: Heading toward having two vectors of set classes to choose from.

change connection to vector_pack:
check_doxygen.sh, ad_fun.hpp, for_jac_sweep.hpp, load_op.hpp
rev_sparse_jac.hpp, store_op.hpp, rev_sparse_hes.hpp, rev_jac_sweep.hpp,
cond_op.hpp, sparse_binary_op.hpp, sparse_unary_op.hpp

*/test_one.sh.in: detect and report error when file does not exist.
makefile.am: change connection.hpp to vector_set.hpp.
makefile.in: changes automatically generated from change in makefile.am
prototype_op.hpp: notes about changing documentation (to do).
vector_set.hpp: connection->vector_pack, n_from->n_set, n_to->limit
connection.hpp: move to vector_set.hpp.
op.hpp: include vector_set.hpp.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1# $Id: test_one.sh.in 1524 2009-09-22 03:07:03Z bradbell $
2# -----------------------------------------------------------------------------
3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
4#
5# CppAD is distributed under multiple licenses. This distribution is under
6# the terms of the
7#                     Common Public License Version 1.0.
8#
9# A copy of this license is included in the COPYING file of this distribution.
10# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11# -----------------------------------------------------------------------------
12#
13# Run one of the tests
14if [ "$1" = "" ]
15then
16        echo "usage: test_one.sh file [extra]"
17        echo "file is the *.cpp file name with extension"
18        echo "and extra is extra options for g++ command"
19        exit 1
20fi
21if [ ! -e "$1" ]
22then
23        echo "Cannot find the file $1"
24        exit 1
25fi
26fun=`grep "^bool *[a-zA-Z0-9_]*( *void *)" $1 | tail -1 | \
27        sed -e "s/^bool *\([a-zA-Z0-9_]*\) *( *void *)/\1/"`
28if [ -e test_one.exe ]
29then
30        rm test_one.exe
31fi
32sed < test_more.cpp > test_one.cpp \
33-e '/ok *\&= *Run( /d' \
34-e "s/.*This line is used by test_one.sh.*/     ok \&= Run( $fun, \"$fun\");/" 
35#
36cmd="g++ test_one.cpp $*
37        -o test_one.exe
38        -g -Wall -ansi -pedantic-errors
39        -std=c++98 -DCPPAD_ADOLC_TEST
40        -I.. -I/usr/include/boost-1_33_1
41"
42if [ -e @ADOLD_DIR@/include/adolc/adouble.h ]
43then
44        cmd="$cmd -I@ADOLC_DIR@/include -L@ADOLC_DIR@/lib -ladolc"
45fi
46if [ -e @IPOPT_DIR@/lib/libipopt.a ]
47then
48        cmd="$cmd -I@IPOPT_DIR@/include"
49        cmd="$cmd -L@IPOPT_DIR@/lib -lipopt"
50        cmd="$cmd @FCLIBS@ @PTHREAD_LIB@ @DL_LIB@"
51        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:@IPOPT_DIR@/lib"
52fi
53echo $cmd
54$cmd
55echo "./test_one.exe"
56if ! ./test_one.exe
57then
58        exit 1
59fi
60exit 0
61
Note: See TracBrowser for help on using the repository browser.