mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 00:45:32 +00:00
e4e2d3a396
Enable running tests under Docker. This makes it easier to spin up an environment with all dependencies (especially the multiple versions of openssl and gnutls needed). * tests/docker/xenial/Dockerfile: Definition for the docker image, including local builds for openssl and gnutls. * tests/scripts/docker_env.sh: New helper script that creates the Docker image and has a function to run a command in the Docker container. * tests/docker/all-in-docker.sh: Wrapper for all.sh under Docker. * tests/docker/basic-in-docker.sh: Script that runs the same commands as .travis.yml, in Docker. * tests/ssl-opt-in-docker.sh: Wrapper to run ssl-opt.sh in Docker. * tests/compat-in-docker.sh: Wrapper to run compat.sh in Docker. * tests/make-in-docker.sh: Wrapper to run make in Docker. Change-Id: Ie092b1deed24c24c3859754535589523ce1d0a58
38 lines
1.2 KiB
Bash
Executable file
38 lines
1.2 KiB
Bash
Executable file
#!/bin/bash -eu
|
|
|
|
# basic-in-docker.sh
|
|
#
|
|
# This file is part of mbed TLS (https://tls.mbed.org)
|
|
#
|
|
# Copyright (c) 2018-2019, ARM Limited, All Rights Reserved
|
|
#
|
|
# Purpose
|
|
# -------
|
|
# This runs a rough equivalent of the travis.yml in a Docker container.
|
|
# The tests are run for both clang and gcc.
|
|
#
|
|
# Notes for users
|
|
# ---------------
|
|
# See docker_env.sh for prerequisites and other information.
|
|
|
|
source tests/scripts/docker_env.sh
|
|
|
|
run_in_docker tests/scripts/recursion.pl library/*.c
|
|
run_in_docker tests/scripts/check-generated-files.sh
|
|
run_in_docker tests/scripts/check-doxy-blocks.pl
|
|
run_in_docker tests/scripts/check-names.sh
|
|
run_in_docker tests/scripts/check-files.py
|
|
run_in_docker tests/scripts/doxygen.sh
|
|
|
|
for compiler in clang gcc; do
|
|
run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
|
|
run_in_docker -e CC=${compiler} make
|
|
run_in_docker -e CC=${compiler} make test
|
|
run_in_docker programs/test/selftest
|
|
run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
|
|
run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
|
|
run_in_docker tests/scripts/test-ref-configs.pl
|
|
run_in_docker tests/scripts/curves.pl
|
|
run_in_docker tests/scripts/key-exchanges.pl
|
|
done
|