]>
Commit | Line | Data |
---|---|---|
412ebb8e A |
1 | #!/bin/sh |
2 | ||
3 | # cd into test-cases directory | |
4 | TEST_CASE_DIR=`echo "$0" | sed 's/build-iPhoneOS-unit-tests/test-cases/'` | |
5 | cd ${TEST_CASE_DIR} | |
6 | TEST_CASE_DIR=`pwd` | |
7 | ||
8 | # make clean | |
9 | ../bin/make-recursive.pl clean > /dev/null | |
10 | ||
11 | # clean staging area | |
12 | rm -rf /var/root/testing | |
13 | mkdir /var/root/testing | |
14 | ||
15 | # create scripts to run test cases on device | |
16 | echo "#!/bin/sh" > /var/root/testing/run-all-tests | |
17 | chmod +x /var/root/testing/run-all-tests | |
18 | ||
19 | # do every combination of OS version and architectures | |
832b6fce | 20 | for os in "6.0" "3.0" |
412ebb8e | 21 | do |
832b6fce | 22 | for arch in armv7 armv6 thumb |
412ebb8e A |
23 | do |
24 | # make copy of tests | |
25 | cp -r ${TEST_CASE_DIR}/../../unit-tests /var/root/testing/unit-tests-${arch}-${os} | |
26 | # build but don't run test cases | |
27 | echo " * * * Building all unit tests for ${arch} iPhoneOS ${os} * * *" | |
28 | cd /var/root/testing/unit-tests-${arch}-${os}/test-cases | |
29 | ../bin/make-recursive.pl ARCH=${arch} OS_VERSION=${os} OS_NAME=iPhoneOS all | ../bin/build-results-filter.pl | |
30 | # update script | |
31 | echo "cd /var/root/testing/unit-tests-${arch}-${os}" >> /var/root/testing/run-all-tests | |
32 | echo "echo \" * * * Running all unit tests for ${arch} iPhoneOS ${os} * * *\"" >> /var/root/testing/run-all-tests | |
33 | echo "bin/make-recursive.pl OS_NAME=iPhoneOS check | bin/result-filter.pl" >> /var/root/testing/run-all-tests | |
34 | done | |
35 | done | |
36 | ||
37 | # tar up all test cases | |
38 | echo " * * * Making archive * * *" | |
39 | cd /var/root | |
40 | ditto -c -z testing /tmp/dyld-testing.cpgz | |
41 | ||
42 | # create script to unpack on device | |
43 | echo "#!/bin/sh" > /tmp/unpack-and-run-all-tests | |
44 | echo "echo \" * * * Unpacking test cases * * *\"" >> /tmp/unpack-and-run-all-tests | |
45 | echo "/sbin/mount -u /private/var" >> /tmp/unpack-and-run-all-tests | |
46 | echo "chmod +x /var/root" >> /tmp/unpack-and-run-all-tests | |
47 | echo "cd /var/root" >> /tmp/unpack-and-run-all-tests | |
48 | echo "rm -rf /var/root/testing" >> /tmp/unpack-and-run-all-tests | |
49 | echo "ditto -x /tmp/dyld-testing.cpgz testing" >> /tmp/unpack-and-run-all-tests | |
50 | echo "/var/root/testing/run-all-tests" >> /tmp/unpack-and-run-all-tests | |
51 | chmod +x /tmp/unpack-and-run-all-tests | |
52 |