1#!/bin/bash -eu
2
3# basic-in-docker.sh
4#
5# Purpose
6# -------
7# 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.
11#
12# Notes for users
13# ---------------
14# See docker_env.sh for prerequisites and other information.
15
16# Copyright The Mbed TLS Contributors
17# 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.
30
31source tests/scripts/docker_env.sh
32
33run_in_docker tests/scripts/all.sh 'check_*'
34
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
43    run_in_docker tests/scripts/curves.pl
44    run_in_docker tests/scripts/key-exchanges.pl
45done
46