blob: 6328bb812838406769640699d92399d4232199f4 [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
Brian O'Connorf5d93632015-09-04 20:18:31 -07006set -e
7
Thomas Vachuska734b7492015-03-11 20:42:07 -07008[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
9. $ONOS_ROOT/tools/build/envDefaults
10
11# Bail on any errors
12set -e
13
14rm -fr $ONOS_TEST_STAGE # Remove this when package script is completed
15
16# Create the stage directory and warp into it
17mkdir -p $ONOS_TEST_STAGE/tools/test \
18 $ONOS_TEST_STAGE/tools/dev \
19 $ONOS_TEST_STAGE/tools/build \
20 $ONOS_TEST_STAGE/tools/package/config
21
22cp -r $ONOS_ROOT/tools/test $ONOS_TEST_STAGE/tools
23cp $ONOS_ROOT/tools/dev/bash_profile $ONOS_TEST_STAGE/tools/dev
24cp $ONOS_ROOT/tools/build/envDefaults $ONOS_TEST_STAGE/tools/build
25
26cd $ONOS_TEST_STAGE_ROOT
27
28# Now package up the ONOS test tools tar file
29COPYFILE_DISABLE=1 tar zcf $ONOS_TEST_TAR $ONOS_TEST_BITS
30cd $ONOS_TEST_STAGE_ROOT
31# rm -r $ONOS_TEST_STAGE