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

Last change on this file since 3683 was 3683, checked in by bradbell, 5 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: febe930d34888cf37df862a1bf118229b9bf37a5
end hash code: 494270b7d9413bba508ae4944e44e33b6f7be05b

commit 494270b7d9413bba508ae4944e44e33b6f7be05b
Author: Brad Bell <bradbell@…>
Date: Sat May 9 19:20:51 2015 -0700

  1. Fix duplicate expm1 in example and test_more makefile.am, CMakeLists.txt.
  2. Extend log theory to include log1p function.


log_forward.omh: remove trailing white space
log_reverse.omh: remove trailing white space

commit d2e5c615a1d620d364c7c73f47f9db18aa4bcba3
Author: Brad Bell <bradbell@…>
Date: Sat May 9 10:09:24 2015 -0700

Add new flags to configure.ac and include auto-tools automatic changes.


test_one.sh.in: handel case where space between name and (void).
exp_reverse.omh: change plural to singular.
test_one.sh.in: handel case where space between name and (void).

commit c62e0f95b359b188556d49fb7e3a75b0eaad12e4
Author: Brad Bell <bradbell@…>
Date: Sat May 9 07:14:17 2015 -0700

Remove trialing white space.

commit f443608ff6f29ed5ff05fa136543d6f2baab7757
Author: Brad Bell <bradbell@…>
Date: Sat May 9 07:13:53 2015 -0700

Fix some warnings when using eigen_vector for the test vector.


configure.ac: Comments for auto-tool commands that will result in many makefile.in changes.
makefile.in: automatic change from corresponding makefile.am.
test_one.sh.in: use cppad_cxx_flags to determine if c++11.
makefile.in: automatic change from corresponding makefile.am.
exp_forward.omh: Fix z{(0)} to be correct for both cases.
makefile.in: automatic change from corresponding makefile.am.

commit 003b9c373b2b77fde81427f57ee3db364fea5eff
Author: Brad Bell <bradbell@…>
Date: Sat May 9 04:53:44 2015 -0700

Add expm1 function.

commit a2b3d2fd72cda066e110368860452c5299211c30
Author: Brad Bell <bradbell@…>
Date: Fri May 8 19:39:12 2015 -0700

CMakeLists.txt: simplify ENDFOREACH command.

commit 31016ed04a3fd618456de115fd98c58f07b89f3e
Author: Brad Bell <bradbell@…>
Date: Fri May 8 17:04:34 2015 -0700

check_example.sh: Fix check that all examples are in list, remove trailing white space.
exp.cpp: minor white space edit.
example_list.omh: add examples that were missing.

commit e48ff330292e90ba40baffa8b2d1b2d12c44f099
Author: Brad Bell <bradbell@…>
Date: Fri May 8 16:31:28 2015 -0700

  1. Add expm1 funtion to exp theory.
  2. Change Exp -> exp.
  3. Remove redundant index commands.
  4. Remove trailing white space.


exp.cpp: more modern names in example.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1#! /bin/bash -e
2# $Id: test_one.sh.in 3683 2015-05-10 02:24:16Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
5#
6# CppAD is distributed under multiple licenses. This distribution is under
7# the terms of the
8#                     Eclipse Public License Version 1.0.
9#
10# A copy of this license is included in the COPYING file of this distribution.
11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12# -----------------------------------------------------------------------------
13#
14# Run one of the tests
15if [ "$1" = "" ]
16then
17        echo "usage: test_one.sh file [extra]"
18        echo "file is the *.cpp file name with extension"
19        echo "and extra is extra options for g++ command"
20        exit 1
21fi
22if [ ! -e "$1" ]
23then
24        echo "Cannot find the file $1"
25        exit 1
26fi
27fun=`grep "^bool *[a-zA-Z0-9_]* *( *void *)" $1 | tail -1 | \
28        sed -e "s/^bool *\([a-zA-Z0-9_]*\) *( *void *)/\1/"`
29if [ -e test_one.exe ]
30then
31        rm test_one.exe
32fi
33sed < test_more.cpp > test_one.cpp \
34-e '/ok *\&= *Run( /d' \
35-e "s/.*This line is used by test_one.sh.*/     ok \&= Run( $fun, \"$fun\");/"
36#
37#
38cxxflags='@cppad_cxx_flags@'
39if echo "$fun" | grep 'eigen' > /dev/null
40then
41        cxxflags=`echo "$cxxflags" | sed -e 's|-Wshadow||'`
42fi
43cmd="g++ test_one.cpp $*"
44if [ -e @colpack_prefix@/include ]
45then
46        cmd="$cmd ../cppad/local/cppad_colpack.cpp"
47fi
48cmd="$cmd
49        -o test_one.exe
50        $cxxflags
51        -g
52        -DCPPAD_ADOLC_TEST
53        -DCPPAD_OPENMP_TEST
54        -DCPPAD_MAX_NUM_THREADS=1
55        @OPENMP_FLAGS@
56        -I..
57"
58if [ -e @adolc_prefix@/include ]
59then
60        cmd="$cmd -I@adolc_prefix@/include"
61fi
62if [ -e @colpack_prefix@/include ]
63then
64        cmd="$cmd -I@colpack_prefix@/include"
65fi
66if [ -e @eigen_prefix@/include ]
67then
68        cmd="$cmd -I@eigen_prefix@/include"
69fi
70for lib in lib lib64
71do
72        if [ -e @adolc_prefix@/$lib ]
73        then
74                cmd="$cmd -L@adolc_prefix@/$lib -ladolc -lColPack"
75                export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:@adolc_prefix@/$lib"
76        fi
77        if [ -e @colpack_prefix@/$lib ]
78        then
79                cmd="$cmd -L@colpack_prefix@/$lib -lColPack"
80                export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:@colpack_prefix@/$lib"
81        fi
82        if [ -e @ipopt_prefix@/$lib/pkgconfig ]
83        then
84                export PKG_CONFIG_PATH="@ipopt_prefix@/$lib/pkgconfig"
85                cflags=`pkg-config --cflags ipopt |
86                        sed -e 's|/coin$|/|' -e 's|/coin | |'`
87                libs=`pkg-config --libs ipopt`
88                cmd="$cmd $cflags $libs"
89        fi
90done
91echo $cmd
92$cmd
93echo "./test_one.exe"
94if ! ./test_one.exe
95then
96        exit 1
97fi
98exit 0
Note: See TracBrowser for help on using the repository browser.