basic-in-docker.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash -eu
  2. # basic-in-docker.sh
  3. #
  4. # Purpose
  5. # -------
  6. # This runs sanity checks and library tests in a Docker container. The tests
  7. # are run for both clang and gcc. The testing includes a full test run
  8. # in the default configuration, partial test runs in the reference
  9. # configurations, and some dependency tests.
  10. #
  11. # WARNING: the Dockerfile used by this script is no longer maintained! See
  12. # https://github.com/Mbed-TLS/mbedtls-test/blob/master/README.md#quick-start
  13. # for the set of Docker images we use on the CI.
  14. #
  15. # Notes for users
  16. # ---------------
  17. # See docker_env.sh for prerequisites and other information.
  18. # Copyright The Mbed TLS Contributors
  19. # SPDX-License-Identifier: Apache-2.0
  20. #
  21. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  22. # not use this file except in compliance with the License.
  23. # You may obtain a copy of the License at
  24. #
  25. # http://www.apache.org/licenses/LICENSE-2.0
  26. #
  27. # Unless required by applicable law or agreed to in writing, software
  28. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  29. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  30. # See the License for the specific language governing permissions and
  31. # limitations under the License.
  32. source tests/scripts/docker_env.sh
  33. run_in_docker tests/scripts/all.sh 'check_*'
  34. for compiler in clang gcc; do
  35. run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
  36. run_in_docker -e CC=${compiler} make
  37. run_in_docker -e CC=${compiler} make test
  38. run_in_docker programs/test/selftest
  39. run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
  40. run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
  41. run_in_docker tests/scripts/test-ref-configs.pl
  42. run_in_docker tests/scripts/depends.py curves
  43. run_in_docker tests/scripts/depends.py kex
  44. done