diff options
author | Axel Fagerstedt <axel.fagerstedt@linaro.org> | 2013-04-17 16:12:01 +0200 |
---|---|---|
committer | Axel Fagerstedt <axel.fagerstedt@linaro.org> | 2013-04-17 16:12:01 +0200 |
commit | 08dc43eafa0d302a4e213e53c1e0028b07f15c9f (patch) | |
tree | f9af8a825195e2985016d261c74cbc60b521470d /build-scripts | |
parent | 498105c67bf1833a72ef679b7faa1d28c6b78e53 (diff) |
Change tarball handling
Diffstat (limited to 'build-scripts')
-rw-r--r-- | build-scripts/build-testsuite-restricted | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/build-scripts/build-testsuite-restricted b/build-scripts/build-testsuite-restricted index 602d373..3e0f837 100644 --- a/build-scripts/build-testsuite-restricted +++ b/build-scripts/build-testsuite-restricted @@ -59,33 +59,34 @@ if test -n "$ANDROID_PREBUILT_URL"; then wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/userdata.tar.bz2 # we are assuming that the makefile has given us a out/ structure - # containing tests_system.tar.bz2 and tests_userdata.tar.bz2 - # which contain android style file structures with the tests - - # setup some temp directories - mkdir -p out/tmp/android - mkdir -p out/tmp/tests - mkdir -p out/tmp/android_tests - - # unpack the filesystems - tar -C out/tmp/tests -pxjf out/tests_system.tar.bz2 - tar -C out/tmp/tests -pxjf out/tests_userdata.tar.bz2 - tar -C out/tmp/android -pxjf system.tar.bz2 - tar -C out/tmp/android -pxjf userdata.tar.bz2 - - # copy tests into the full android fs - cp -r out/tmp/android/* out/tmp/android_tests/. - cp -r out/tmp/tests/* out/tmp/android_tests/. - - # create tarballs with android image + tests - tar -pcjf out/userdata.tar.bz2 -C out/tmp/android_tests data - tar -pcjf out/system.tar.bz2 -C out/tmp/android_tests system - - # also give the boot image from the prebuilt as a artifact - mv boot.tar.bz2 out/. - - # clean out files we no longer need - rm system.tar.bz2 userdata.tar.bz2 - rm -rf out/tmp + # containing data/ and system/ with the test files + + # uncompress the archives so we can update them + bunzip2 --keep userdata.tar.bz2 + bunzip2 --keep system.tar.bz2 + mv userdata.tar out/. + mv system.tar out/. + + # update the archives with the tests + cd out + tar -uvpf userdata.tar data + tar -uvpf system.tar system + + # compress them again + bzip2 userdata.tar + bzip2 system.tar + + # create tarballs with just the tests + tar -pcjf tests_userdata.tar.bz2 data + tar -pcjf tests_system.tar.bz2 system + + #clean up + rm -rf data + rm -rf system + cd .. + rm -rf system.tar.bz2 + rm -rf userdata.tar.bz2 +else + echo "ERROR: Could not locate prebuilt android image, please set ANDROID_PREBUILT_URL" fi |