basic-in-docker.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. # Notes for users
  12. # ---------------
  13. # See docker_env.sh for prerequisites and other information.
  14. # Copyright The Mbed TLS Contributors
  15. # SPDX-License-Identifier: Apache-2.0
  16. #
  17. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  18. # not use this file except in compliance with the License.
  19. # You may obtain a copy of the License at
  20. #
  21. # http://www.apache.org/licenses/LICENSE-2.0
  22. #
  23. # Unless required by applicable law or agreed to in writing, software
  24. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  25. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26. # See the License for the specific language governing permissions and
  27. # limitations under the License.
  28. source tests/scripts/docker_env.sh
  29. run_in_docker tests/scripts/all.sh 'check_*'
  30. for compiler in clang gcc; do
  31. run_in_docker -e CC=${compiler} cmake -D CMAKE_BUILD_TYPE:String="Check" .
  32. run_in_docker -e CC=${compiler} make
  33. run_in_docker -e CC=${compiler} make test
  34. run_in_docker programs/test/selftest
  35. run_in_docker -e OSSL_NO_DTLS=1 tests/compat.sh
  36. run_in_docker tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
  37. run_in_docker tests/scripts/test-ref-configs.pl
  38. run_in_docker tests/scripts/curves.pl
  39. run_in_docker tests/scripts/key-exchanges.pl
  40. done