quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

compat-in-docker.sh (1642B)


      1 #!/bin/bash -eu
      2 
      3 # compat-in-docker.sh
      4 #
      5 # Purpose
      6 # -------
      7 # This runs compat.sh in a Docker container.
      8 #
      9 # WARNING: the Dockerfile used by this script is no longer maintained! See
     10 # https://github.com/Mbed-TLS/mbedtls-test/blob/master/README.md#quick-start
     11 # for the set of Docker images we use on the CI.
     12 #
     13 # Notes for users
     14 # ---------------
     15 # If OPENSSL, GNUTLS_CLI, or GNUTLS_SERV are specified the path must
     16 # correspond to an executable inside the Docker container. The special
     17 # values "next" (OpenSSL only) and "legacy" are also allowed as shorthand
     18 # for the installations inside the container.
     19 #
     20 # See also:
     21 # - scripts/docker_env.sh for general Docker prerequisites and other information.
     22 # - compat.sh for notes about invocation of that script.
     23 
     24 # Copyright The Mbed TLS Contributors
     25 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
     26 
     27 source tests/scripts/docker_env.sh
     28 
     29 case "${OPENSSL:-default}" in
     30     "legacy")  export OPENSSL="/usr/local/openssl-1.0.1j/bin/openssl";;
     31     "next")    export OPENSSL="/usr/local/openssl-1.1.1a/bin/openssl";;
     32     *) ;;
     33 esac
     34 
     35 case "${GNUTLS_CLI:-default}" in
     36     "legacy")  export GNUTLS_CLI="/usr/local/gnutls-3.3.8/bin/gnutls-cli";;
     37     "next")  export GNUTLS_CLI="/usr/local/gnutls-3.7.2/bin/gnutls-cli";;
     38     *) ;;
     39 esac
     40 
     41 case "${GNUTLS_SERV:-default}" in
     42     "legacy")  export GNUTLS_SERV="/usr/local/gnutls-3.3.8/bin/gnutls-serv";;
     43     "next")  export GNUTLS_SERV="/usr/local/gnutls-3.7.2/bin/gnutls-serv";;
     44     *) ;;
     45 esac
     46 
     47 run_in_docker \
     48     -e M_CLI \
     49     -e M_SRV \
     50     -e GNUTLS_CLI \
     51     -e GNUTLS_SERV \
     52     -e OPENSSL \
     53     -e OSSL_NO_DTLS \
     54     tests/compat.sh \
     55     $@