Merge pull request #165 from andlaus/travis_ewoms

Travis ewoms
This commit is contained in:
Arne Morten Kvarving 2016-08-22 17:14:09 +02:00 committed by GitHub
commit cbda0ae4a0
5 changed files with 13 additions and 15 deletions

View File

@ -1,4 +1,8 @@
# - Build satellites that are dependent of main library
option(ADD_DISABLED_CTESTS "Add the tests which are disabled due to failed preconditions to the ctest output (this makes ctest return an error if such a test is present)" ON)
mark_as_advanced(ADD_DISABLED_CTESTS)
#
# Enumerate all source code in a "satellite" directory such as tests/,
# compile each of them and optionally set them as a test for CTest to
@ -337,7 +341,7 @@ macro(opm_add_test TestName)
# the following causes the test to appear as 'skipped' in the
# CDash dashboard. it this is removed, the test is just silently
# ignored.
if (NOT CURTEST_ONLY_COMPILE)
if (NOT CURTEST_ONLY_COMPILE AND ADD_DISABLED_CTESTS)
add_test(${TestName} skip_test_dummy)
endif()
endif()

View File

@ -86,13 +86,9 @@ function build_downstreams {
# OPM_DATA_ROOT - passed for modules having opm-data based integration tests
# USE_QUADMATH - used by ewoms to disable quadmath support (makes tests usable)
# ENABLE_PYTHON - will build the Python wrappers for OpmParser, ignored by the other modules.
clone_and_build_module $downstream "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install -DOPM_DATA_ROOT=$OPM_DATA_ROOT -DENABLE_PYTHON=ON -DUSE_QUADMATH=0" ${downstreamRev[$downstream]} $WORKSPACE/serial 1
code=$?
# ewoms skips tests in nasty ways. ignore return code
if [ "$downstream" != "ewoms" ]
then
test $code -eq 0 || exit 1
fi
# ADD_DISABLED_CTESTS - will not add ctests to the output which are disabled due to missing dependencies.
clone_and_build_module $downstream "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install -DOPM_DATA_ROOT=$OPM_DATA_ROOT -DENABLE_PYTHON=ON -DUSE_QUADMATH=0 -DADD_DISABLED_CTESTS=OFF" ${downstreamRev[$downstream]} $WORKSPACE/serial 1
test $? -eq 0 || exit 1
# Installation for downstream
pushd .

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
build_order=(opm-common opm-parser opm-material opm-output opm-core opm-grid opm-simulators opm-upscaling)
build_order=(opm-common opm-parser opm-material opm-output opm-core opm-grid ewoms opm-simulators opm-upscaling)
# This shell script should be started with the name of a module as
# only only command line argument. It will start by building all
@ -30,7 +30,7 @@ function upstream_build {
echo "Building: ${project}"
mkdir -p ${project}/build
pushd ${project}/build > /dev/null
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=OFF -DSILENCE_EXTERNAL_WARNINGS=True
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=OFF -DSILENCE_EXTERNAL_WARNINGS=True -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
make
popd > /dev/null
}
@ -44,7 +44,7 @@ function downstream_build_and_test {
# The build commands cmake, make and ctest must be given as
# separate commands and not chained with &&. If chaining with &&
# is used the 'set -e' does not exit on first error.
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=ON -DSILENCE_EXTERNAL_WARNINGS=True
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=ON -DSILENCE_EXTERNAL_WARNINGS=True -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
make
ctest --output-on-failure
popd > /dev/null

View File

@ -81,6 +81,4 @@ build_dune dune-common
build_dune dune-istl
build_dune dune-geometry
build_dune dune-grid
build_dune dune-localfunctions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
project_list=(opm-data opm-parser opm-material opm-core opm-output opm-grid opm-simulators opm-upscaling ewoms)
project_list=(opm-data opm-parser opm-material ewoms opm-core opm-output opm-grid opm-simulators opm-upscaling)
# Will clone all the projects *except* the one project given as
# commandline argument; that has typically been checked out by travis