#!/bin/bash set -e export parent_workspace="${parent_workspace:-"/mnt/ci_build/workspace/odp-api-check"}" make_sh=${test_sh:-""} ROOT_DIR=$(readlink -f $(dirname $0)) export CLEANUP="${CLEANUP:-1}" source ${ROOT_DIR}/helper/toolchain source ${ROOT_DIR}/helper/openssl source ${ROOT_DIR}/helper/cunit source ${ROOT_DIR}/helper/coverity cd $ROOT_DIR usage_cross_compile() { ./make-test.sh -h tc_usage cunit_usage } if [ "x$1" = "x-h" ]; then usage_cross_compile exit 0 fi trap cleanup_exit_cross_compile INT TERM EXIT cleanup_exit_cross_compile() { if [[ ${CLEANUP} -eq 1 ]]; then cd $ROOT_DIR rm -rf gcc-linaro-* openssl_cleanup cunit_cleanup fi } build_odp() { export CROSS_HOST="--host=${compiler_prefix}" if [ "$COV_DIR" != "" ]; then get_coverity fi ./make${test_sh}-test.sh [[ $? -eq 1 ]] && exit 1 cd - } find_toolchain_to_download install_custom_toolchain setup_compiler_prefix build_openssl build_cunit if [ ${PLATFORM} == "linux-keystone2" ]; then echo "wait with building ODP..." else build_odp fi ## vim: set sw=4 sts=4 et foldmethod=syntax : ##