Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 1 | #!/bin/bash -eu |
| 2 | |
| 3 | # compat-in-docker.sh |
| 4 | # |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 5 | # Purpose |
| 6 | # ------- |
| 7 | # This runs compat.sh in a Docker container. |
| 8 | # |
| 9 | # Notes for users |
| 10 | # --------------- |
| 11 | # If OPENSSL_CMD, GNUTLS_CLI, or GNUTLS_SERV are specified the path must |
| 12 | # correspond to an executable inside the Docker container. The special |
| 13 | # values "next" (OpenSSL only) and "legacy" are also allowed as shorthand |
| 14 | # for the installations inside the container. |
| 15 | # |
| 16 | # See also: |
| 17 | # - scripts/docker_env.sh for general Docker prerequisites and other information. |
| 18 | # - compat.sh for notes about invocation of that script. |
| 19 | |
Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 20 | # Copyright (C) 2006-2019, Arm Limited (or its affiliates), All Rights Reserved. |
| 21 | # SPDX-License-Identifier: Apache-2.0 |
| 22 | # |
| 23 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 24 | # not use this file except in compliance with the License. |
| 25 | # You may obtain a copy of the License at |
| 26 | # |
| 27 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 28 | # |
| 29 | # Unless required by applicable law or agreed to in writing, software |
| 30 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 31 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 32 | # See the License for the specific language governing permissions and |
| 33 | # limitations under the License. |
| 34 | # |
| 35 | # This file is part of Mbed TLS (https://tls.mbed.org) |
| 36 | |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 37 | source tests/scripts/docker_env.sh |
| 38 | |
| 39 | case "${OPENSSL_CMD:-default}" in |
| 40 | "legacy") export OPENSSL_CMD="/usr/local/openssl-1.0.1j/bin/openssl";; |
| 41 | "next") export OPENSSL_CMD="/usr/local/openssl-1.1.1a/bin/openssl";; |
| 42 | *) ;; |
| 43 | esac |
| 44 | |
| 45 | case "${GNUTLS_CLI:-default}" in |
| 46 | "legacy") export GNUTLS_CLI="/usr/local/gnutls-3.3.8/bin/gnutls-cli";; |
| 47 | "next") export GNUTLS_CLI="/usr/local/gnutls-3.6.5/bin/gnutls-cli";; |
| 48 | *) ;; |
| 49 | esac |
| 50 | |
| 51 | case "${GNUTLS_SERV:-default}" in |
| 52 | "legacy") export GNUTLS_SERV="/usr/local/gnutls-3.3.8/bin/gnutls-serv";; |
| 53 | "next") export GNUTLS_SERV="/usr/local/gnutls-3.6.5/bin/gnutls-serv";; |
| 54 | *) ;; |
| 55 | esac |
| 56 | |
| 57 | run_in_docker \ |
| 58 | -e M_CLI \ |
| 59 | -e M_SRV \ |
| 60 | -e GNUTLS_CLI \ |
| 61 | -e GNUTLS_SERV \ |
| 62 | -e OPENSSL_CMD \ |
| 63 | -e OSSL_NO_DTLS \ |
| 64 | tests/compat.sh \ |
| 65 | $@ |