blob: 1f65710c8af3cc40d584642ca1c6fb4a20c6807f [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#
12# Notes for users
13# ---------------
14# See docker_env.sh for prerequisites and other information.
15
Bence Szépkúti1e148272020-08-07 13:07:28 +020016# Copyright The Mbed TLS Contributors
Peter Kolbus4225b1a2019-05-31 06:38:06 -050017# SPDX-License-Identifier: Apache-2.0
18#
19# Licensed under the Apache License, Version 2.0 (the "License"); you may
20# not use this file except in compliance with the License.
21# You may obtain a copy of the License at
22#
23# http://www.apache.org/licenses/LICENSE-2.0
24#
25# Unless required by applicable law or agreed to in writing, software
26# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
27# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28# See the License for the specific language governing permissions and
29# limitations under the License.
Peter Kolbus4225b1a2019-05-31 06:38:06 -050030
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060031source tests/scripts/docker_env.sh
32
Gilles Peskine68a98512020-06-25 14:19:09 +020033run_in_docker tests/scripts/all.sh 'check_*'
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060034
35for compiler in clang gcc; do
36 run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
37 run_in_docker -e CC=${compiler} make
38 run_in_docker -e CC=${compiler} make test
39 run_in_docker programs/test/selftest
40 run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
41 run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
42 run_in_docker tests/scripts/test-ref-configs.pl
Andrzej Kurek29c002e2022-10-24 10:59:55 -040043 run_in_docker tests/scripts/depends.py curves
44 run_in_docker tests/scripts/depends.py kex
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060045done