12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- # StarPU --- Runtime system for heterogeneous multicore architectures.
- #
- # Copyright (C) 2016 Université de Bordeaux
- # Copyright (C) 2016 CNRS
- #
- # StarPU is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at
- # your option) any later version.
- #
- # StarPU is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- #
- # See the GNU Lesser General Public License in COPYING.LGPL for more details.
- # This provides a helper function to be used for microbenchs that should be run
- # under the various schedulers.
- #
- # The caller should fill either the XFAIL or XSUCCESS variable with the list of
- # schedulers which are supposed to fail or succeed, and then call test_scheds
- set -e
- SCHEDS=`$(dirname $0)/../../tools/starpu_sched_display`
- test_scheds()
- {
- TEST=$1
- xfailed=""
- failed=""
- pass=""
- skip=""
- RESULT=0
- for sched in $SCHEDS;
- do
- set +e
- STARPU_SCHED=$sched $(dirname $0)/$TEST
- ret=$?
- set -e
- if test $ret == 0
- then
- echo "SUCCESS: STARPU_SCHED=$sched ./microbenchs/$TEST"
- pass="$pass $sched"
- continue
- fi
- if test $ret == 77
- then
- echo "SKIP: STARPU_SCHED=$sched ./microbenchs/$TEST"
- skip="$skip $sched"
- continue
- fi
- if [ -n "$XSUCCESS" ]
- then
- # We have a list of schedulers that are expected to
- # succeed, others are allowed to fail
- case " $XSUCCESS " in
- *\ $sched\ *)
- echo "FAIL: STARPU_SCHED=$sched ./microbenchs/$TEST" | ( tee /dev/tty || true )
- failed="$failed $sched"
- RESULT=1
- ;;
- *)
- echo "XFAIL: STARPU_SCHED=$sched ./microbenchs/$TEST"
- xfailed="$xfailed $sched"
- ;;
- esac
- else
- # We have a list of schedulers that are expected to
- # fail, others are expected to succeed
- case " $XFAIL " in
- *\ $sched\ *)
- echo "XFAIL: STARPU_SCHED=$sched ./microbenchs/$TEST"
- xfailed="$xfailed $sched"
- ;;
- *)
- echo "FAIL: STARPU_SCHED=$sched ./microbenchs/$TEST" | ( tee /dev/tty || true )
- failed="$failed $sched"
- RESULT=1
- ;;
- esac
- fi
- done
- echo "passed schedulers:$pass"| ( tee /dev/tty || true )
- echo "skipped schedulers:$skip"| ( tee /dev/tty || true )
- echo "failed schedulers:$failed"| ( tee /dev/tty || true )
- echo "xfailed schedulers:$xfailed"| ( tee /dev/tty || true )
- return $RESULT
- }
|