blob: 83d665598e0f0b77cfd2f1a39fcb471b41d34270 [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
Peter Kolbus4225b1a2019-05-31 06:38:06 -050016# Copyright (C) 2006-2019, Arm Limited (or its affiliates), All Rights Reserved.
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#
31# This file is part of Mbed TLS (https://tls.mbed.org)
32
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060033source tests/scripts/docker_env.sh
34
Gilles Peskine68a98512020-06-25 14:19:09 +020035run_in_docker tests/scripts/all.sh 'check_*'
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060036
37for compiler in clang gcc; do
38 run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
39 run_in_docker -e CC=${compiler} make
40 run_in_docker -e CC=${compiler} make test
41 run_in_docker programs/test/selftest
42 run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
43 run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
44 run_in_docker tests/scripts/test-ref-configs.pl
45 run_in_docker tests/scripts/curves.pl
46 run_in_docker tests/scripts/key-exchanges.pl
47done