]> git.saurik.com Git - apple/dyld.git/blame_incremental - unit-tests/build-iPhoneOS-unit-tests
dyld-195.5.tar.gz
[apple/dyld.git] / unit-tests / build-iPhoneOS-unit-tests
... / ...
CommitLineData
1#!/bin/sh
2
3# cd into test-cases directory
4TEST_CASE_DIR=`echo "$0" | sed 's/build-iPhoneOS-unit-tests/test-cases/'`
5cd ${TEST_CASE_DIR}
6TEST_CASE_DIR=`pwd`
7
8# make clean
9../bin/make-recursive.pl clean > /dev/null
10
11# clean staging area
12rm -rf /var/root/testing
13mkdir /var/root/testing
14
15# create scripts to run test cases on device
16echo "#!/bin/sh" > /var/root/testing/run-all-tests
17chmod +x /var/root/testing/run-all-tests
18
19# do every combination of OS version and architectures
20for os in "4.3" "3.0"
21do
22 for arch in armv6 thumb armv7 thumb2
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
35done
36
37# tar up all test cases
38echo " * * * Making archive * * *"
39cd /var/root
40ditto -c -z testing /tmp/dyld-testing.cpgz
41
42# create script to unpack on device
43echo "#!/bin/sh" > /tmp/unpack-and-run-all-tests
44echo "echo \" * * * Unpacking test cases * * *\"" >> /tmp/unpack-and-run-all-tests
45echo "/sbin/mount -u /private/var" >> /tmp/unpack-and-run-all-tests
46echo "chmod +x /var/root" >> /tmp/unpack-and-run-all-tests
47echo "cd /var/root" >> /tmp/unpack-and-run-all-tests
48echo "rm -rf /var/root/testing" >> /tmp/unpack-and-run-all-tests
49echo "ditto -x /tmp/dyld-testing.cpgz testing" >> /tmp/unpack-and-run-all-tests
50echo "/var/root/testing/run-all-tests" >> /tmp/unpack-and-run-all-tests
51chmod +x /tmp/unpack-and-run-all-tests
52