blob: 3aca3a134d12da203164bac7ff2a8468bd607ff0 [file] [log] [blame]
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -06001#!/bin/bash -eu
2
3# basic-in-docker.sh
4#
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -06005# Purpose
6# -------
Gilles Peskine68a98512020-06-25 14:19:09 +02007# This runs sanity checks and library tests in a Docker container. The tests
8# are run for both clang and gcc. The testing includes a full test run
9# in the default configuration, partial test runs in the reference
10# configurations, and some dependency tests.
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060011#
Manuel Pégourié-Gonnard59626b62022-12-15 10:08:26 +010012# WARNING: the Dockerfile used by this script is no longer maintained! See
13# https://github.com/Mbed-TLS/mbedtls-test/blob/master/README.md#quick-start
14# for the set of Docker images we use on the CI.
15#
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060016# Notes for users
17# ---------------
18# See docker_env.sh for prerequisites and other information.
19
Bence Szépkúti1e148272020-08-07 13:07:28 +020020# Copyright The Mbed TLS Contributors
Dave Rodgman16799db2023-11-02 19:47:20 +000021# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
Peter Kolbus4225b1a2019-05-31 06:38:06 -050022
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060023source tests/scripts/docker_env.sh
24
Gilles Peskine68a98512020-06-25 14:19:09 +020025run_in_docker tests/scripts/all.sh 'check_*'
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060026
27for compiler in clang gcc; do
28 run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
29 run_in_docker -e CC=${compiler} make
30 run_in_docker -e CC=${compiler} make test
31 run_in_docker programs/test/selftest
32 run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
33 run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
34 run_in_docker tests/scripts/test-ref-configs.pl
Andrzej Kurek29c002e2022-10-24 10:59:55 -040035 run_in_docker tests/scripts/depends.py curves
36 run_in_docker tests/scripts/depends.py kex
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060037done