1#!/bin/sh 2 3case @abi@ in 4 macho) 5 export DYLD_FALLBACK_LIBRARY_PATH="@objroot@lib" 6 ;; 7 pecoff) 8 export PATH="${PATH}:@objroot@lib" 9 ;; 10 *) 11 ;; 12esac 13 14# Corresponds to test_status_t. 15pass_code=0 16skip_code=1 17fail_code=2 18 19pass_count=0 20skip_count=0 21fail_count=0 22for t in $@; do 23 if [ $pass_count -ne 0 -o $skip_count -ne 0 -o $fail_count != 0 ] ; then 24 echo 25 fi 26 echo "=== ${t} ===" 27 ${t}@exe@ @abs_srcroot@ @abs_objroot@ 28 result_code=$? 29 case ${result_code} in 30 ${pass_code}) 31 pass_count=$((pass_count+1)) 32 ;; 33 ${skip_code}) 34 skip_count=$((skip_count+1)) 35 ;; 36 ${fail_code}) 37 fail_count=$((fail_count+1)) 38 ;; 39 *) 40 echo "Test harness error" 1>&2 41 exit 1 42 esac 43done 44 45total_count=`expr ${pass_count} + ${skip_count} + ${fail_count}` 46echo 47echo "Test suite summary: pass: ${pass_count}/${total_count}, skip: ${skip_count}/${total_count}, fail: ${fail_count}/${total_count}" 48 49if [ ${fail_count} -eq 0 ] ; then 50 exit 0 51else 52 exit 1 53fi 54