Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 1 | #!/bin/bash -eu |
| 2 | |
| 3 | # basic-in-docker.sh |
| 4 | # |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 5 | # Purpose |
| 6 | # ------- |
Gilles Peskine | 68a9851 | 2020-06-25 14:19:09 +0200 | [diff] [blame^] | 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. |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 11 | # |
| 12 | # Notes for users |
| 13 | # --------------- |
| 14 | # See docker_env.sh for prerequisites and other information. |
| 15 | |
Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 16 | # 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 Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 33 | source tests/scripts/docker_env.sh |
| 34 | |
Gilles Peskine | 68a9851 | 2020-06-25 14:19:09 +0200 | [diff] [blame^] | 35 | run_in_docker tests/scripts/all.sh 'check_*' |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 36 | |
| 37 | for 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 |
| 47 | done |