[Merge] lp:~robru/phablet-tools/trunk into lp:phablet-tools

Sergio Schvezov sergio.schvezov at canonical.com
Mon May 12 20:45:45 UTC 2014


Looks good, I had something more rustic as a bash function... :-)

test_silo_remotely() {
    silo=$1
    shift
    packages="$*"
    adb shell "mount -o remount,rw / && add-apt-repository -y
ppa:ci-train-ppa-service/landing-$silo && apt-get update && apt-get install
-y $packages &&   add-apt-repository -r -y
ppa:ci-train-ppa-service/landing-$silo && apt-get update && mount -o
remount,ro /"
}

test_silo() {
    silo=$1
    shift
    packages="$*"
    sudo add-apt-repository -y ppa:ci-train-ppa-service/landing-$silo &&
sudo apt-get update && sudo apt-get install -y $packages &&   sudo
add-apt-repository -r -y ppa:ci-train-ppa-service/landing-$silo && sudo
apt-get update
}

You might want to add failure cases in case more than one device is
connected and no ANDROID_SERIAL is exported (look at my latest
phablet-screenshot MP for a quick hack at this if you want)


On Mon, May 12, 2014 at 5:34 PM, Robert Bruce Park <
robert.park at canonical.com> wrote:

> Robert Bruce Park has proposed merging lp:~robru/phablet-tools/trunk into
> lp:phablet-tools.
>
> Commit message:
> Add scripts for handling CI Train silos.
>
>
> Requested reviews:
>   Sergio Schvezov (sergiusens)
>   Ubuntu Phablet Team (phablet-team)
>
> For more details, see:
> https://code.launchpad.net/~robru/phablet-tools/trunk/+merge/219261
>
>
> --
> https://code.launchpad.net/~robru/phablet-tools/trunk/+merge/219261
> You are requested to review the proposed merge of
> lp:~robru/phablet-tools/trunk into lp:phablet-tools.
>
> === added file 'citrain-push'
> --- citrain-push        1970-01-01 00:00:00 +0000
> +++ citrain-push        2014-05-12 20:33:24 +0000
> @@ -0,0 +1,32 @@
> +#!/bin/sh -e
> +# This program is free software: you can redistribute it and/or modify it
> +# under the terms of the the GNU General Public License version 3, as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it will be useful, but
> +# WITHOUT ANY WARRANTY; without even the implied warranties of
> +# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
> +# PURPOSE.  See the applicable version of the GNU General Public
> +# License for more details.
> +#.
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +#
> +# Copyright (C) 2014 Canonical, Ltd.
> +
> +silo_number=$1
> +
> +if ! echo $silo_number | egrep -q "^[0-9]{3}$"; then
> +    echo "This tool will install all binary packages from a CI Train silo
> onto"
> +    echo "a connected Ubuntu Touch device."
> +    echo
> +    echo "Usage: $0 nnn"
> +    echo "(note silo number must be 3-digits)"
> +    exit 1
> +fi
> +
> +wget -qO-
> http://ppa.launchpad.net/ci-train-ppa-service/landing-$silo_number/ubuntu/dists/devel/main/source/Sources\
> +    | perl -ne 'chomp; s/, / -p /g; s/^Binary: / -p / && print' \
> +    | xargs phablet-config writable-image \
> +            --ppa ppa:ci-train-ppa-service/landing-$silo_number
> +adb reboot
>
> === added file 'citrain-slurp'
> --- citrain-slurp       1970-01-01 00:00:00 +0000
> +++ citrain-slurp       2014-05-12 20:33:24 +0000
> @@ -0,0 +1,34 @@
> +#!/bin/sh -e
> +# This program is free software: you can redistribute it and/or modify it
> +# under the terms of the the GNU General Public License version 3, as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it will be useful, but
> +# WITHOUT ANY WARRANTY; without even the implied warranties of
> +# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
> +# PURPOSE.  See the applicable version of the GNU General Public
> +# License for more details.
> +#.
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +#
> +# Copyright (C) 2014 Canonical, Ltd.
> +
> +silo_number=$1
> +
> +if ! echo $silo_number | egrep -q "^[0-9]{3}$"; then
> +    echo "This tool will install all binary packages from a CI Train silo
> onto"
> +    echo "the host machine."
> +    echo
> +    echo "Usage: $0 nnn"
> +    echo "(note silo number must be 3-digits)"
> +    exit 1
> +fi
> +
> +sudo add-apt-repository ppa:ci-train-ppa-service/landing-$silo_number
> +sudo apt-get update -qq
> +wget -qO-
> http://ppa.launchpad.net/ci-train-ppa-service/landing-$silo_number/ubuntu/dists/devel/main/source/Sources\
> +    | perl -ne 's/,//g; s/^Binary: // && print' \
> +    | xargs sudo apt-get install --yes
> +sudo rm -rf /etc/apt/sources.list.d/ci-train*
> +sudo apt-get update -qq
>
>
>

-- 
https://code.launchpad.net/~robru/phablet-tools/trunk/+merge/219261
Your team Ubuntu Phablet Team is requested to review the proposed merge of lp:~robru/phablet-tools/trunk into lp:phablet-tools.



More information about the Ubuntu-reviews mailing list