1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #!/bin/bash
- export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR
- export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR
- test_executables=("$BUILT_PRODUCTS_DIR/gtest_unittest-framework"
- "$BUILT_PRODUCTS_DIR/gtest_unittest"
- "$BUILT_PRODUCTS_DIR/sample1_unittest-framework"
- "$BUILT_PRODUCTS_DIR/sample1_unittest-static")
- succeeded=0
- failed=0
- failed_list=()
- for test in ${test_executables[*]}; do
- "$test"
- result=$?
- if [ $result -eq 0 ]; then
- succeeded=$(( $succeeded + 1 ))
- else
- failed=$(( failed + 1 ))
- failed_list="$failed_list $test"
- fi
- done
- echo "Tests complete with $succeeded successes and $failed failures."
- if [ $failed -ne 0 ]; then
- echo "The following tests failed:"
- echo $failed_list
- fi
- exit $failed
|