| #!/bin/bash |
| # ----------------------------------------------------------------------------- |
| # Validates the specified ONOS release bits using STC and a borrowed cell. |
| # ----------------------------------------------------------------------------- |
| |
| export DOWNLOAD_URL=http://downloads.onosproject.org/release |
| export ONOS_VERSION=$1 |
| |
| [ -z "$ONOS_VERSION" ] && echo "usage: $(basename $0) <version>" >&2 && exit 1 |
| [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| |
| # Temporary: Check-out the version tag using existing ONOS_ROOT |
| # TODO: Download the test bits from the download site and use that for ONOS_ROOT |
| git checkout $ONOS_VERSION |
| |
| # Download the ONOS bits from the download site |
| rm /tmp/onos-$ONOS_VERSION.tar.gz |
| curl -LsS --fail $DOWNLOAD_URL/onos-$ONOS_VERSION.tar.gz > /tmp/onos-$ONOS_VERSION.tar.gz |
| |
| # Borrow a test cell and run STC |
| . $ONOS_ROOT/tools/dev/bash_profile |
| cell borrow |
| stc |