| 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 |  | 
| Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 16 | # Copyright The Mbed TLS Contributors | 
| Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 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. | 
| Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 30 |  | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 31 | source tests/scripts/docker_env.sh | 
|  | 32 |  | 
| Gilles Peskine | 68a9851 | 2020-06-25 14:19:09 +0200 | [diff] [blame] | 33 | run_in_docker tests/scripts/all.sh 'check_*' | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 34 |  | 
|  | 35 | for 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 | 
|  | 45 | done |