diff --git a/.travis.sh b/.travis.sh index 429efcc6..e869f8f6 100755 --- a/.travis.sh +++ b/.travis.sh @@ -23,12 +23,16 @@ set -e # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +fetch_from_github() { + git clone https://github.com/$1/$2.git -b $3 --depth=1 +} + install_from_github() { echo "Installing $2" - git clone https://github.com/$1/$2.git -b $3 + fetch_from_github $1 $2 $3 cd $2 autoreconf -fvi - ./configure $4 + ./configure $4 $5 make sudo -E make install cd .. @@ -36,15 +40,40 @@ install_from_github() { sudo ldconfig } +install_openssl() { + echo "Installing $1" + fetch_from_github openssl openssl $1 + cd openssl + OPENSSL_DIR=/usr/local + ./config shared -fPIC --openssldir=${OPENSSL_DIR} --prefix=${OPENSSL_DIR} + make depend && make + sudo make install_sw + cd .. + echo "$1 installed" + sudo ldconfig + SOFTHSM_OPENSSL_DIR="--with-openssl=${OPENSSL_DIR}" +} + sudo apt-get update -qq + # libpcsclite-dev is required for OpenSC sudo apt-get install -y libpcsclite-dev export CC=`which $CC` mkdir prerequisites cd prerequisites + +if [ -n "${OPENSSL}" ]; then + # Remove pre-installed OpenSSL + sudo apt-get remove openssl libssl-dev + + install_openssl ${OPENSSL} +fi + install_from_github OpenSC OpenSC master # softhsm is required for "make check" -install_from_github opendnssec SoftHSMv2 master --disable-gost +install_from_github opendnssec SoftHSMv2 master --disable-gost \ + ${SOFTHSM_OPENSSL_DIR} + cd .. rm -rf prerequisites diff --git a/.travis.yml b/.travis.yml index f56ecce9..4b82d6f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ -sudo: true +language: c +sudo: required env: global: @@ -10,25 +11,38 @@ env: - COVERITY_SCAN_BUILD_COMMAND="make" - COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG" - SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) + matrix: + - OPENSSL="OpenSSL_1_0_2-stable" + - OPENSSL="OpenSSL_1_1_0-stable" -language: c +compiler: + - gcc + - clang + +os: + - linux matrix: include: - - compiler: clang - - compiler: gcc - - env: DO_COVERITY_SCAN=yes + - os: linux + compiler: gcc + env: DO_COVERITY_SCAN=yes -before_script: - - openssl version -a +install: - ./.travis.sh - - touch config.rpath && autoreconf -fvi && ./configure --enable-strict --enable-pedantic + +before_script: + - touch config.rpath && autoreconf -fvi && ./configure ${CONFIG_FLAGS} # Optionally try to upload to Coverity Scan # On error (propably quota is exhausted), just continue - echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- - if [ -n "${DO_COVERITY_SCAN}" ]; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true; fi + - openssl version -a script: - if [ -z "${DO_COVERITY_SCAN}" ]; then make && make check && make dist; fi + +after_failure: + - cat tests/test-suite.log diff --git a/tests/fork-change-slot.c b/tests/fork-change-slot.c index 8e782ce4..f17c7020 100644 --- a/tests/fork-change-slot.c +++ b/tests/fork-change-slot.c @@ -206,11 +206,6 @@ int main(int argc, char *argv[]) goto failed; } - if (!ENGINE_set_default(engine, ENGINE_METHOD_ALL)) { - error_queue("ENGINE_set_default", pid); - goto failed; - } - ENGINE_free(engine); engine = NULL; }