diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2019-01-15 19:39:44 +0300 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2019-01-16 13:00:27 +0300 |
commit | 1da4bf25c8d95134508f08766b75df78812cc845 (patch) | |
tree | b058004f458b41bf090a8a55d990a768e5e8acf9 /scripts | |
parent | 94838120ec803c38f5f4728e3082bc559226f813 (diff) |
Test windows integration for travis-ci
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/run_integration.sh | 41 | ||||
-rwxr-xr-x | scripts/test_integration.sh | 3 |
2 files changed, 31 insertions, 13 deletions
diff --git a/scripts/run_integration.sh b/scripts/run_integration.sh index 8ae1200..322cf4c 100755 --- a/scripts/run_integration.sh +++ b/scripts/run_integration.sh @@ -75,24 +75,39 @@ function assert_defined(){ } function integrate() { - cd "${PROJECT_FOLDER}" || exit + cd "${PROJECT_FOLDER}" + case "${OS}" in + "Windows_NT") CMAKE_BUILD_ARGS="--config Debug --target ALL_BUILD" + CMAKE_TEST_ARGS="--config Debug --target RUN_TESTS" + DEMO=${BUILD_DIR}/Debug/list_cpu_features.exe + ;; + *) CMAKE_BUILD_ARGS="--target all" + CMAKE_TEST_ARGS="--target test" + DEMO=${BUILD_DIR}/list_cpu_features + ;; + esac + + # Generating CMake configuration cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS} - cmake --build "${BUILD_DIR}" --target all + # Building + cmake --build "${BUILD_DIR}" ${CMAKE_BUILD_ARGS} + + # Running tests if needed + if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then + return + fi if [[ -n "${QEMU_ARCH}" ]]; then - if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then - QEMU="true || " - else - installqemuifneeded - QEMU="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS}" - fi + installqemuifneeded + QEMU="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS}" + for test_binary in ${BUILD_DIR}/test/*_test; do + ${QEMU} ${test_binary} + done + ${QEMU} ${DEMO} else - QEMU="" + cmake --build "${BUILD_DIR}" ${CMAKE_TEST_ARGS} + ${DEMO} fi - # Run tests - for test_binary in ${BUILD_DIR}/test/*_test; do ${QEMU} ${test_binary}; done - # Run demo program - ${QEMU} "${BUILD_DIR}/list_cpu_features" } function expand_linaro_config() { diff --git a/scripts/test_integration.sh b/scripts/test_integration.sh index a167227..d180e48 100755 --- a/scripts/test_integration.sh +++ b/scripts/test_integration.sh @@ -76,6 +76,9 @@ ENVIRONMENTS=" set_mips " +set -v +set -e + for SET_ENVIRONMENT in ${ENVIRONMENTS}; do ${SET_ENVIRONMENT} expand_environment_and_integrate |