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