Thomas Vachuska | cb20528 | 2016-10-25 10:41:49 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Validates the specified ONOS release bits using STC and a borrowed cell. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | export DOWNLOAD_URL=http://downloads.onosproject.org/release |
| 7 | export ONOS_VERSION=$1 |
| 8 | |
| 9 | [ -z "$ONOS_VERSION" ] && echo "usage: $(basename $0) <version>" >&2 && exit 1 |
| 10 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 11 | |
| 12 | # Temporary: Check-out the version tag using existing ONOS_ROOT |
| 13 | # TODO: Download the test bits from the download site and use that for ONOS_ROOT |
| 14 | git checkout $ONOS_VERSION |
| 15 | |
| 16 | # Download the ONOS bits from the download site |
| 17 | rm /tmp/onos-$ONOS_VERSION.tar.gz |
| 18 | curl -LsS --fail $DOWNLOAD_URL/onos-$ONOS_VERSION.tar.gz > /tmp/onos-$ONOS_VERSION.tar.gz |
| 19 | |
| 20 | # Borrow a test cell and run STC |
| 21 | . $ONOS_ROOT/tools/dev/bash_profile |
| 22 | cell borrow |
| 23 | stc |