source: trunk/bin/jenkins.sh @ 2794

Last change on this file since 2794 was 2794, checked in by bradbell, 7 years ago
  1. Use CPPAD_NULL, intead of 0, for null pointer.

check_if_0.sh: Ignore subdirectories of new directories.
jenkins.sh: output logs when an error occurs.
acos_op.hpp: avoid use of q (will use it for an order index).
asin_op.hpp: avoid use of q (will use it for an order index).
forward_sweep.hpp: chnage d to p, use const in prototype.
div_op.hpp: minor edit of white space.
atom_usead_2.cpp: use ADFUN to compute variable/parameter information.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1#! /bin/bash -e
2# $Id: jenkins.sh 2794 2013-05-02 08:20:30Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 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# distribution directory corresponding to this version of CppAD
14trunk_dir=`pwd`
15# -----------------------------------------------------------------------------
16# bash function that echos and executes a command
17echo_eval() {
18        echo $*
19        eval $*
20}
21# bash function that echos and executes a command
22log_eval() {
23        echo "------------------------------------------------" >> ../jenkins.log
24        echo "------------------------------------------------" >> ../jenkins.err
25        echo $*  >> ../jenkins.log
26        echo $*  >> ../jenkins.err
27        echo $* "1>> ../jenkins.log 2>> ../jenkins.err"
28        if ! eval $*  1>> ../jenkins.log 2>> ../jenkins.err
29        then
30                echo_eval cat jenkins.log
31                echo_eval cat jenkins.err
32                exit 1
33        fi
34}
35for ext in log err
36do
37        if [ -e "../jenkins.$ext" ]
38        then
39                echo_eval rm ../jenkins.$ext
40        fi
41done
42# -----------------------------------------------
43if [ $0 != "bin/jenkins.sh" ]
44then
45        echo "bin/jenkins.sh: must be executed from its parent directory"
46        exit 1
47fi
48#
49# Running bin/get_fadbad.sh will install include files in
50#       trunk_dir/build/prefix/include/FADBAD++
51log_eval bin/get_fadbad.sh
52#
53# Running bin/get_eigen.sh will install include files in
54#       trunk_dir/build/prefix/include/Eigen
55log_eval bin/get_eigen.sh
56#
57# Running bin/get_sacado.sh will
58# build sacado in: trunk_dir/build/external
59# install it in:   trunk_dir/build/prefix
60# It will re-use the currently compiled verison if available.
61### log_eval bin/get_sacado.sh
62#
63# Running bin/get_ipopt.sh will
64# build ipopt in: trunk_dir/build/external
65# install it in:  trunk_dir/build/prefix
66# It will re-use the currently compiled verison if available.
67log_eval bin/get_ipopt.sh
68#
69# Use trunk_dir/../build to build and test CppAD (no reuse)
70echo_eval cd ..
71echo_eval rm -rf build
72echo_eval mkdir build
73echo_eval cd build
74#
75# configure cppad to use all the packages above
76#### SACADO_DIR="$trunk_dir/build/prefix" \
77log_eval $trunk_dir/configure \
78        EIGEN_DIR="$trunk_dir/build/prefix" \
79        IPOPT_DIR="$trunk_dir/build/prefix" \
80        FADBAD_DIR="$trunk_dir/build/prefix" 
81#
82# compile the tests
83log_eval make check
84#
85# run the tests
86log_eval make test
87#
88# print the test results on the console
89sed -n -e '/^make test$/,$p' ../jenkins.log
90#
91# print final get_ipopt.sh result on the console
92grep 'get_ipopt.sh:' ../jenkins.log
93#
94# make it here without an error exit
95echo "jenkins.sh: OK"
Note: See TracBrowser for help on using the repository browser.