blob: 1e23786643fb8ec19fcaf4b11f3a141bbb5d8dd1 [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
Thomas Vachuskabe1a1962016-10-25 16:59:29 -07006echo "Use 'onos-buck build //:onos-test' instead"
7exit 1
8
Brian O'Connorf5d93632015-09-04 20:18:31 -07009set -e
10
Thomas Vachuska734b7492015-03-11 20:42:07 -070011[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
12. $ONOS_ROOT/tools/build/envDefaults
13
14# Bail on any errors
15set -e
16
17rm -fr $ONOS_TEST_STAGE # Remove this when package script is completed
18
19# Create the stage directory and warp into it
20mkdir -p $ONOS_TEST_STAGE/tools/test \
Thomas Vachuska20150f32016-08-04 13:57:17 -070021 $ONOS_TEST_STAGE/tools/dev/bin \
Thomas Vachuska734b7492015-03-11 20:42:07 -070022 $ONOS_TEST_STAGE/tools/build \
23 $ONOS_TEST_STAGE/tools/package/config
24
25cp -r $ONOS_ROOT/tools/test $ONOS_TEST_STAGE/tools
26cp $ONOS_ROOT/tools/dev/bash_profile $ONOS_TEST_STAGE/tools/dev
Thomas Vachuska20150f32016-08-04 13:57:17 -070027cp $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 -070028cp $ONOS_ROOT/tools/build/envDefaults $ONOS_TEST_STAGE/tools/build
29
30cd $ONOS_TEST_STAGE_ROOT
31
32# Now package up the ONOS test tools tar file
33COPYFILE_DISABLE=1 tar zcf $ONOS_TEST_TAR $ONOS_TEST_BITS
34cd $ONOS_TEST_STAGE_ROOT
35# rm -r $ONOS_TEST_STAGE