Thomas Vachuska | 734b749 | 2015-03-11 20:42:07 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Packages ONOS test facilities into onos-test.tar.gz |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
Thomas Vachuska | be1a196 | 2016-10-25 16:59:29 -0700 | [diff] [blame] | 6 | echo "Use 'onos-buck build //:onos-test' instead" |
| 7 | exit 1 |
| 8 | |
Brian O'Connor | f5d9363 | 2015-09-04 20:18:31 -0700 | [diff] [blame] | 9 | set -e |
| 10 | |
Thomas Vachuska | 734b749 | 2015-03-11 20:42:07 -0700 | [diff] [blame] | 11 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 12 | . $ONOS_ROOT/tools/build/envDefaults |
| 13 | |
| 14 | # Bail on any errors |
| 15 | set -e |
| 16 | |
| 17 | rm -fr $ONOS_TEST_STAGE # Remove this when package script is completed |
| 18 | |
| 19 | # Create the stage directory and warp into it |
| 20 | mkdir -p $ONOS_TEST_STAGE/tools/test \ |
Thomas Vachuska | 20150f3 | 2016-08-04 13:57:17 -0700 | [diff] [blame] | 21 | $ONOS_TEST_STAGE/tools/dev/bin \ |
Thomas Vachuska | 734b749 | 2015-03-11 20:42:07 -0700 | [diff] [blame] | 22 | $ONOS_TEST_STAGE/tools/build \ |
| 23 | $ONOS_TEST_STAGE/tools/package/config |
| 24 | |
| 25 | cp -r $ONOS_ROOT/tools/test $ONOS_TEST_STAGE/tools |
| 26 | cp $ONOS_ROOT/tools/dev/bash_profile $ONOS_TEST_STAGE/tools/dev |
Thomas Vachuska | 20150f3 | 2016-08-04 13:57:17 -0700 | [diff] [blame] | 27 | cp $ONOS_ROOT/tools/dev/bin/onos-app $ONOS_ROOT/tools/dev/bin/onos-create-app $ONOS_TEST_STAGE/tools/dev/bin |
Thomas Vachuska | 734b749 | 2015-03-11 20:42:07 -0700 | [diff] [blame] | 28 | cp $ONOS_ROOT/tools/build/envDefaults $ONOS_TEST_STAGE/tools/build |
| 29 | |
| 30 | cd $ONOS_TEST_STAGE_ROOT |
| 31 | |
| 32 | # Now package up the ONOS test tools tar file |
| 33 | COPYFILE_DISABLE=1 tar zcf $ONOS_TEST_TAR $ONOS_TEST_BITS |
| 34 | cd $ONOS_TEST_STAGE_ROOT |
| 35 | # rm -r $ONOS_TEST_STAGE |