blob: 38a48770a562317c3103f9c53daf9fffc836ab05 [file] [log] [blame]
Thomas Vachuska734b7492015-03-11 20:42:07 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Packages ONOS test facilities into onos-test.tar.gz
4# -----------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9# Bail on any errors
10set -e
11
12rm -fr $ONOS_TEST_STAGE # Remove this when package script is completed
13
14# Create the stage directory and warp into it
15mkdir -p $ONOS_TEST_STAGE/tools/test \
16 $ONOS_TEST_STAGE/tools/dev \
17 $ONOS_TEST_STAGE/tools/build \
18 $ONOS_TEST_STAGE/tools/package/config
19
20cp -r $ONOS_ROOT/tools/test $ONOS_TEST_STAGE/tools
21cp $ONOS_ROOT/tools/dev/bash_profile $ONOS_TEST_STAGE/tools/dev
22cp $ONOS_ROOT/tools/build/envDefaults $ONOS_TEST_STAGE/tools/build
23
24cd $ONOS_TEST_STAGE_ROOT
25
26# Now package up the ONOS test tools tar file
27COPYFILE_DISABLE=1 tar zcf $ONOS_TEST_TAR $ONOS_TEST_BITS
28cd $ONOS_TEST_STAGE_ROOT
29# rm -r $ONOS_TEST_STAGE