]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/execperf/test.sh
xnu-3247.10.11.tar.gz
[apple/xnu.git] / tools / tests / execperf / test.sh
CommitLineData
6d2010ae
A
1#!/bin/sh
2
3EXECUTABLES="exit.nodyld \
4 exit.nopie.dyld-but-no-Libsystem exit.pie.dyld-but-no-Libsystem \
5 exit.nopie.dyld-and-Libsystem exit.pie.dyld-and-Libsystem \
6 exit.nopie exit.pie"
7
8RUN=run
9PRODUCT=`sw_vers -productName`
10COUNT=
11
12case "$PRODUCT" in
13 "iPhone OS")
14 COUNT=1000
15 ;;
16 *)
17 COUNT=10000
18 ;;
19esac
20
fe8ab488
A
21for i in ${EXECUTABLES}; do
22 echo "Running $i"
23 for j in `jot $(sysctl -n hw.ncpu) 1`; do
24 printf "\t%dx\t" $j
6d2010ae
A
25 /usr/bin/time ./${RUN} $j $((${COUNT}/$j)) ./$i
26 if [ $? -ne 0 ]; then
27 echo "Failed $i, exit status $?"
28 exit 1
29 fi
30 done
31done