summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2016-03-14 01:55:24 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-03-16 06:00:14 -0400
commitaa9944c7e4b268a458f1f28478d9772edf8af2d8 (patch)
tree593c928966a8eadadc76d4795c16eec7ea92257b
parentfbbd7e9532defda49dbc265455228c7ae7d47312 (diff)
downloadtalos-sbe-aa9944c7e4b268a458f1f28478d9772edf8af2d8.tar.gz
talos-sbe-aa9944c7e4b268a458f1f28478d9772edf8af2d8.zip
Enable Workon tools
Change-Id: Ifedd4b64cc21d3f9ab7b652b8a737d1f94171b03 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21965 Tested-by: Jenkins Server Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
-rwxr-xr-xcustomrc5
-rwxr-xr-xenv.bash6
-rwxr-xr-xsb61
-rwxr-xr-xsbe/build/citest/setup-env8
4 files changed, 69 insertions, 11 deletions
diff --git a/customrc b/customrc
index 79175fdf..55360e7b 100755
--- a/customrc
+++ b/customrc
@@ -2,9 +2,9 @@
# Never checkin this file other than changes in BACKING_BUILD
# If you want to change location of default sandbox root, enable SANDBOXROOT
-#export SANDBOXROOT=~/workspace/
+export SANDBOXROOT=$SBEROOT
# If you want to change name of default sandbox, enable SANDBOXNAME
-#export SANDBOXNAME=sbe_simics_sandbox
+export SANDBOXNAME=test_sb
#export WORKSPACE=<set it to your root ppe directory. This is required if you
# to use build script locally>
@@ -12,4 +12,3 @@ export MACHINE=NIMBUS
export BACKING_BUILD=/esw/fips910/Builds/b0314a_1612.910/
export SIMICSOPTIONS="-nre"
-
diff --git a/env.bash b/env.bash
index d8e5c256..bd96510f 100755
--- a/env.bash
+++ b/env.bash
@@ -1,12 +1,12 @@
ROOTDIR=.
+export SBEROOT=`pwd`
if [ -e ./customrc ]; then
source ./customrc
fi
-export PATH=${PATH}:`pwd`/tools/ppetracepp
-
-export SBEROOT=`pwd`
+export PATH=${PATH}:${SBEROOT}/import/chips/p9/xip/bin/
+export PATH=${PATH}:${SBEROOT}/tools/ppetracepp/
if [ -n "${SANDBOXROOT}" ]; then
if [ -n "${SANDBOXNAME}" ]; then
diff --git a/sb b/sb
new file mode 100755
index 00000000..fe2c289b
--- /dev/null
+++ b/sb
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+sb_helptext()
+{
+ echo "SBE Utility Script"
+
+ case $1 in
+ workon)
+ echo " Topic 'workon'"
+ echo
+ echo " Usage:"
+ echo " sb workon"
+ echo
+ echo " Sources necessary environment files for building sbe"
+ echo " and begins a new shell. The workon may be left via 'exit'."
+ echo
+ echo " See also:"
+ echo " customrc"
+ ;;
+ *)
+ echo " Usage:"
+ echo " sb <cmd>"
+ echo " sb help [<cmd>|<topic>]"
+ echo
+ echo " Available Commands:"
+ echo " workon"
+ echo
+ esac
+}
+
+sb_workon()
+{
+ if [ -n "${SBE_INSIDE_WORKON}" ]; then
+ echo "Already in a workon."
+ exit -1
+ else
+ export SBE_INSIDE_WORKON=1
+ echo "Setting environment variables..."
+ source ./env.bash
+ echo "Spawning new shell with devtoolset 2..."
+ scl enable devtoolset-2 bash
+ fi
+}
+
+if [ 0 == $# ]; then
+ sb_helptext
+ exit -1
+fi
+
+FIRST_PARAM=$1
+shift
+
+case ${FIRST_PARAM} in
+workon)
+ sb_workon $*
+ ;;
+*)
+ sb_helptext $*
+ exit -1
+ ;;
+esac
diff --git a/sbe/build/citest/setup-env b/sbe/build/citest/setup-env
index 4d458700..124d3a8e 100755
--- a/sbe/build/citest/setup-env
+++ b/sbe/build/citest/setup-env
@@ -20,14 +20,12 @@ then
export SANDBOXROOT=${SBEROOT}
fi
-if [ -z $SANDBOXNAME ];
+if [ -z $SANDBOXNAME ] || [ $RUNNING_UNDER_JENKINS -eq 1 ];
then
export SANDBOXNAME=${SBECI_SANDBOX}
fi
-if [ -z $SANDBOXBASE ];
-then
- export SANDBOXBASE=${SANDBOXROOT}/${SANDBOXNAME}
-fi
+
+export SANDBOXBASE=${SANDBOXROOT}/${SANDBOXNAME}
if [ -z $SANDBOXRC ];
then
OpenPOWER on IntegriCloud