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 | # ------- |
| 7 | # This runs a rough equivalent of the travis.yml in a Docker container. |
| 8 | # The tests are run for both clang and gcc. |
| 9 | # |
| 10 | # Notes for users |
| 11 | # --------------- |
| 12 | # See docker_env.sh for prerequisites and other information. |
| 13 | |
Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame^] | 14 | # Copyright (C) 2006-2019, Arm Limited (or its affiliates), All Rights Reserved. |
| 15 | # SPDX-License-Identifier: Apache-2.0 |
| 16 | # |
| 17 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 18 | # not use this file except in compliance with the License. |
| 19 | # You may obtain a copy of the License at |
| 20 | # |
| 21 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 22 | # |
| 23 | # Unless required by applicable law or agreed to in writing, software |
| 24 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 25 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 26 | # See the License for the specific language governing permissions and |
| 27 | # limitations under the License. |
| 28 | # |
| 29 | # This file is part of Mbed TLS (https://tls.mbed.org) |
| 30 | |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 31 | source tests/scripts/docker_env.sh |
| 32 | |
| 33 | run_in_docker tests/scripts/recursion.pl library/*.c |
| 34 | run_in_docker tests/scripts/check-generated-files.sh |
| 35 | run_in_docker tests/scripts/check-doxy-blocks.pl |
| 36 | run_in_docker tests/scripts/check-names.sh |
| 37 | run_in_docker tests/scripts/check-files.py |
| 38 | run_in_docker tests/scripts/doxygen.sh |
| 39 | |
| 40 | for compiler in clang gcc; do |
| 41 | run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" . |
| 42 | run_in_docker -e CC=${compiler} make |
| 43 | run_in_docker -e CC=${compiler} make test |
| 44 | run_in_docker programs/test/selftest |
| 45 | run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh |
| 46 | run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl' |
| 47 | run_in_docker tests/scripts/test-ref-configs.pl |
| 48 | run_in_docker tests/scripts/curves.pl |
| 49 | run_in_docker tests/scripts/key-exchanges.pl |
| 50 | done |