blob: 94d153d1bc8d490943f231014bf79426d4b368fe [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 \
Thomas Vachuska20150f32016-08-04 13:57:17 -070018 $ONOS_TEST_STAGE/tools/dev/bin \
Thomas Vachuska734b7492015-03-11 20:42:07 -070019 $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
Thomas Vachuska20150f32016-08-04 13:57:17 -070024cp $ONOS_ROOT/tools/dev/bin/onos-app $ONOS_ROOT/tools/dev/bin/onos-create-app $ONOS_TEST_STAGE/tools/dev/bin
Thomas Vachuska734b7492015-03-11 20:42:07 -070025cp $ONOS_ROOT/tools/build/envDefaults $ONOS_TEST_STAGE/tools/build
26
27cd $ONOS_TEST_STAGE_ROOT
28
29# Now package up the ONOS test tools tar file
30COPYFILE_DISABLE=1 tar zcf $ONOS_TEST_TAR $ONOS_TEST_BITS
31cd $ONOS_TEST_STAGE_ROOT
32# rm -r $ONOS_TEST_STAGE