]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/execperf/test.sh
xnu-1699.22.73.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
21for j in 1 2 3; do
22 for i in ${EXECUTABLES}; do
23 echo "Running $i"
24 /usr/bin/time ./${RUN} $j $((${COUNT}/$j)) ./$i
25 if [ $? -ne 0 ]; then
26 echo "Failed $i, exit status $?"
27 exit 1
28 fi
29 done
30done