test_mac.sh 899 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. #
  3. # Copyright (c) Contributors to the Open 3D Engine Project.
  4. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. #
  6. # SPDX-License-Identifier: Apache-2.0 OR MIT
  7. #
  8. #
  9. set -o errexit # exit on the first failure encountered
  10. BASEDIR=$(dirname "$0")
  11. source $BASEDIR/env_mac.sh
  12. if [[ ! -d $OUTPUT_DIRECTORY ]]; then
  13. echo [ci_build] Error: $OUTPUT_DIRECTORY was not found
  14. exit 1
  15. fi
  16. pushd $OUTPUT_DIRECTORY
  17. # Find the CTEST_RUN_FLAGS from the CMakeCache.txt file, then replace the $<CONFIG> with the current configuration
  18. CTEST_RUN_FLAGS=$(cmake -N -LA . | grep "CTEST_RUN_FLAGS:STRING")
  19. CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS/CTEST_RUN_FLAGS:STRING=/}
  20. CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS/$<CONFIG>/${CONFIGURATION}}
  21. # Run ctest
  22. echo [ci_build] ctest ${CTEST_RUN_FLAGS} ${CTEST_OPTIONS}
  23. ctest ${CTEST_RUN_FLAGS} ${CTEST_OPTIONS}
  24. popd