Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,57 @@ 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 ..
echo "$2 installed"
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
30 changes: 22 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sudo: true
language: c
sudo: required

env:
global:
Expand All @@ -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
5 changes: 0 additions & 5 deletions tests/fork-change-slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down