]>
Commit | Line | Data |
---|---|---|
d696c285 A |
1 | #!/bin/sh |
2 | ||
2f2f92e4 A |
3 | unset RC_TRACE_DYLIBS |
4 | unset RC_TRACE_ARCHIVES | |
5 | unset LD_TRACE_DYLIBS | |
6 | unset LD_TRACE_ARCHIVES | |
7 | ||
d696c285 A |
8 | # cd into test-cases directory |
9 | cd `echo "$0" | sed 's/run-all-unit-tests/test-cases/'` | |
10 | ||
a61fdf0a A |
11 | [ "$PROCTORRUN" ] && exec ../proctor-run |
12 | ||
afe874b1 A |
13 | all_archs="x86_64 i386" |
14 | valid_archs="x86_64 i386" | |
e456bf10 | 15 | ios_sdk_directory="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" |
afe874b1 | 16 | # only test arm code if iOS platform tools installed |
e456bf10 A |
17 | min_available_ios_sdk_version() |
18 | { | |
19 | ls "${ios_sdk_directory}" | | |
20 | grep --invert-match --ignore-case "internal" | # exclude internal SDKs | |
21 | sort --version-sort | head -n 1 | # take SDK with min version | |
22 | sed "s/^iPhoneOS\(.*\)\.sdk$/\1/" # return only the version string | |
23 | } | |
24 | version_ge() | |
25 | { | |
26 | test "$(printf '%s\n' "$@" | sort --version-sort | head -n 1)" == "$2"; | |
27 | } | |
28 | if [ -d $ios_sdk_directory ] | |
afe874b1 | 29 | then |
e456bf10 A |
30 | arm_arch="armv7" |
31 | # Newer SDKs don't support older architectures. | |
32 | if version_ge "$(min_available_ios_sdk_version)" "11.0" | |
33 | then | |
34 | arm_arch="arm64" | |
35 | fi | |
36 | all_archs="${all_archs} ${arm_arch}" | |
37 | valid_archs="${valid_archs} ${arm_arch}" | |
afe874b1 A |
38 | fi |
39 | ||
d696c285 | 40 | |
77cc3118 A |
41 | # clean first |
42 | ../bin/make-recursive.pl clean > /dev/null | |
43 | ||
a61fdf0a | 44 | mkdir /tmp/$$ |
d696c285 A |
45 | for arch in $all_archs |
46 | do | |
47 | echo "" | |
48 | echo " * * * Running all unit tests for architecture $arch * * *" | |
49 | ||
50 | # build architecture | |
a61fdf0a A |
51 | [ "$NEWTEST" ] && NT=-newtest |
52 | ||
2f2f92e4 | 53 | ../bin/make-recursive$NT.pl ARCH=$arch VALID_ARCHS="$valid_archs" | ../bin/result-filter.pl |
d696c285 A |
54 | |
55 | # clean up so svn is happy | |
56 | ../bin/make-recursive.pl ARCH=$arch clean > /dev/null | |
57 | ||
58 | echo "" | |
59 | done |