blob: 02cafb0cc5fcbb4edaffec8d0c2b14eb623e7933 [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é-Gonnard73147982022-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
Peter Kolbus4225b1a2019-05-31 06:38:06 -050021# SPDX-License-Identifier: Apache-2.0
22#
23# Licensed under the Apache License, Version 2.0 (the "License"); you may
24# not use this file except in compliance with the License.
25# You may obtain a copy of the License at
26#
27# http://www.apache.org/licenses/LICENSE-2.0
28#
29# Unless required by applicable law or agreed to in writing, software
30# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
31# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32# See the License for the specific language governing permissions and
33# limitations under the License.
Peter Kolbus4225b1a2019-05-31 06:38:06 -050034
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060035source tests/scripts/docker_env.sh
36
Gilles Peskine68a98512020-06-25 14:19:09 +020037run_in_docker tests/scripts/all.sh 'check_*'
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060038
39for compiler in clang gcc; do
40 run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
41 run_in_docker -e CC=${compiler} make
42 run_in_docker -e CC=${compiler} make test
43 run_in_docker programs/test/selftest
44 run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
45 run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
46 run_in_docker tests/scripts/test-ref-configs.pl
Andrzej Kurekc5acdb92022-10-26 11:15:34 -040047 run_in_docker tests/scripts/depends.py curves
48 run_in_docker tests/scripts/depends.py kex
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060049done