1a8e1175bSopenharmony_ci#!/bin/bash -eu
2a8e1175bSopenharmony_ci
3a8e1175bSopenharmony_ci# basic-in-docker.sh
4a8e1175bSopenharmony_ci#
5a8e1175bSopenharmony_ci# Purpose
6a8e1175bSopenharmony_ci# -------
7a8e1175bSopenharmony_ci# This runs sanity checks and library tests in a Docker container. The tests
8a8e1175bSopenharmony_ci# are run for both clang and gcc. The testing includes a full test run
9a8e1175bSopenharmony_ci# in the default configuration, partial test runs in the reference
10a8e1175bSopenharmony_ci# configurations, and some dependency tests.
11a8e1175bSopenharmony_ci#
12a8e1175bSopenharmony_ci# WARNING: the Dockerfile used by this script is no longer maintained! See
13a8e1175bSopenharmony_ci# https://github.com/Mbed-TLS/mbedtls-test/blob/master/README.md#quick-start
14a8e1175bSopenharmony_ci# for the set of Docker images we use on the CI.
15a8e1175bSopenharmony_ci#
16a8e1175bSopenharmony_ci# Notes for users
17a8e1175bSopenharmony_ci# ---------------
18a8e1175bSopenharmony_ci# See docker_env.sh for prerequisites and other information.
19a8e1175bSopenharmony_ci
20a8e1175bSopenharmony_ci# Copyright The Mbed TLS Contributors
21a8e1175bSopenharmony_ci# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
22a8e1175bSopenharmony_ci
23a8e1175bSopenharmony_cisource tests/scripts/docker_env.sh
24a8e1175bSopenharmony_ci
25a8e1175bSopenharmony_cirun_in_docker tests/scripts/all.sh 'check_*'
26a8e1175bSopenharmony_ci
27a8e1175bSopenharmony_cifor compiler in clang gcc; do
28a8e1175bSopenharmony_ci    run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
29a8e1175bSopenharmony_ci    run_in_docker -e CC=${compiler} make
30a8e1175bSopenharmony_ci    run_in_docker -e CC=${compiler} make test
31a8e1175bSopenharmony_ci    run_in_docker programs/test/selftest
32a8e1175bSopenharmony_ci    run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
33a8e1175bSopenharmony_ci    run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
34a8e1175bSopenharmony_ci    run_in_docker tests/scripts/test-ref-configs.pl
35a8e1175bSopenharmony_ci    run_in_docker tests/scripts/depends.py curves
36a8e1175bSopenharmony_ci    run_in_docker tests/scripts/depends.py kex
37a8e1175bSopenharmony_cidone
38