]> git.saurik.com Git - apple/dyld.git/blame - unit-tests/build-iPhoneOS-unit-tests
dyld-353.2.1.tar.gz
[apple/dyld.git] / unit-tests / build-iPhoneOS-unit-tests
CommitLineData
412ebb8e
A
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
19894a12 20for os in "7.0"
412ebb8e 21do
19894a12 22 for arch in armv7 arm64
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
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