From 9e27b494c7cc7151392b990e03285fa52c371ee8 Mon Sep 17 00:00:00 2001 From: Axel Fagerstedt Date: Wed, 17 Apr 2013 19:37:40 +0200 Subject: Rename buildtype to build-android-testsuite-restricted --- build-scripts/build-android-testsuite-restricted | 95 ++++++++++++++++++++++++ build-scripts/build-testsuite-restricted | 95 ------------------------ 2 files changed, 95 insertions(+), 95 deletions(-) create mode 100644 build-scripts/build-android-testsuite-restricted delete mode 100644 build-scripts/build-testsuite-restricted diff --git a/build-scripts/build-android-testsuite-restricted b/build-scripts/build-android-testsuite-restricted new file mode 100644 index 0000000..9bc4a8f --- /dev/null +++ b/build-scripts/build-android-testsuite-restricted @@ -0,0 +1,95 @@ +############################################################################### +# Copyright (c) 2013 Linaro +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################### + +export GIT_SSH=/var/run/lava/ssh + +source "${BUILD_SCRIPT_ROOT}"/helpers + +trap infrastructure_error ERR + +# get the source +if [ -n "$REPO_SEED_URL" ]; then + repo-sync-from-seed "${1}" +else + repo-sync-from-mirror "${1}" +fi + +# get toolchain +if test -n "$TOOLCHAIN_URL"; then + wget -nv --no-check-certificate $TOOLCHAIN_URL + toolchain_filename=`echo $TOOLCHAIN_URL | sed -e 's/.*\/\([^/]*\)$/\1/'` + mkdir toolchain + tar -C toolchain --strip-components 1 -xf $toolchain_filename + rm -rf $toolchain_filename + export PATH=`pwd`/toolchain/bin:$PATH + if test -z "$TOOLCHAIN_TRIPLET"; then + #assume arm-linux-gnueabihf- + echo "WARNING: assuming arm.linux-gnueabihf toolchain" + CROSS_COMPILE="CROSS_COMPILE=arm-linux-gnueabihf-" + else + CROSS_COMPILE="CROSS_COMPILE=$TOOLCHAIN_TRIPLET" + fi +else + echo "ERROR: TOOLCHAIN_URL is not optional." + exit 1 +fi + +# build the tests +trap - ERR +if test -e "build/Makefile"; then + make $CROSS_COMPILE -C build/ build + make $CROSS_COMPILE -C build/ install +else + echo "ERROR: Could not locate build tools, expecting a Makefile in build/ with targets build and install" + exit 1 +fi + +trap infrastructure_error ERR + +# Combine output with prebuilt android images +if test -n "$ANDROID_PREBUILT_URL"; then + #get prebuilt android + wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/boot.tar.bz2 + wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/system.tar.bz2 + wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/userdata.tar.bz2 + + # move thw boot tarball + mv boot.tar.bz2 out/. + + # we are assuming that the makefile has given us a out/ structure + # 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 + diff --git a/build-scripts/build-testsuite-restricted b/build-scripts/build-testsuite-restricted deleted file mode 100644 index 9bc4a8f..0000000 --- a/build-scripts/build-testsuite-restricted +++ /dev/null @@ -1,95 +0,0 @@ -############################################################################### -# Copyright (c) 2013 Linaro -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -############################################################################### - -export GIT_SSH=/var/run/lava/ssh - -source "${BUILD_SCRIPT_ROOT}"/helpers - -trap infrastructure_error ERR - -# get the source -if [ -n "$REPO_SEED_URL" ]; then - repo-sync-from-seed "${1}" -else - repo-sync-from-mirror "${1}" -fi - -# get toolchain -if test -n "$TOOLCHAIN_URL"; then - wget -nv --no-check-certificate $TOOLCHAIN_URL - toolchain_filename=`echo $TOOLCHAIN_URL | sed -e 's/.*\/\([^/]*\)$/\1/'` - mkdir toolchain - tar -C toolchain --strip-components 1 -xf $toolchain_filename - rm -rf $toolchain_filename - export PATH=`pwd`/toolchain/bin:$PATH - if test -z "$TOOLCHAIN_TRIPLET"; then - #assume arm-linux-gnueabihf- - echo "WARNING: assuming arm.linux-gnueabihf toolchain" - CROSS_COMPILE="CROSS_COMPILE=arm-linux-gnueabihf-" - else - CROSS_COMPILE="CROSS_COMPILE=$TOOLCHAIN_TRIPLET" - fi -else - echo "ERROR: TOOLCHAIN_URL is not optional." - exit 1 -fi - -# build the tests -trap - ERR -if test -e "build/Makefile"; then - make $CROSS_COMPILE -C build/ build - make $CROSS_COMPILE -C build/ install -else - echo "ERROR: Could not locate build tools, expecting a Makefile in build/ with targets build and install" - exit 1 -fi - -trap infrastructure_error ERR - -# Combine output with prebuilt android images -if test -n "$ANDROID_PREBUILT_URL"; then - #get prebuilt android - wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/boot.tar.bz2 - wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/system.tar.bz2 - wget -nv --no-check-certificate $ANDROID_PREBUILT_URL/userdata.tar.bz2 - - # move thw boot tarball - mv boot.tar.bz2 out/. - - # we are assuming that the makefile has given us a out/ structure - # 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 - -- cgit v1.2.3