blob: 7c0e11f418505629d4cf6be81fd3016273c5de27 [file] [log] [blame]
#!/bin/bash
echo -e "\n##### Set TestON Branch #####"
echo "TestON Branch is set on: $TestONBranch"
cd ~/OnosSystemTest/
git checkout HEAD~1 # Make sure you aren't pn a branch
git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote
git branch -D $TestONBranch # just incase there are local changes. This will normally result in a branch not found error
git clean -df # clean any local files
git fetch --all # update all caches from remotes
git reset --hard origin/$TestONBranch # force local index to match remote branch
git clean -df # clean any local files
git checkout $TestONBranch #create new local branch
git branch
git log -1 --decorate
# Cherry pick the debugging patch for CHO
git fetch ssh://you@gerrit.onosproject.org:29418/OnosSystemTest refs/changes/51/14951/5 && git cherry-pick FETCH_HEAD
echo -e "\n##### Set ONOS Branch #####"
echo "ONOS Branch is set on: $ONOSBranch"
echo -e "\n##### set a branch param for downstream project to use #####"
echo $ONOSBranch > /tmp/branchToTest #set a param for downstream project to use
#cat /tmp/branchToTest
cd ~/onos
git checkout HEAD~1 # Make sure you aren't pn a branch
git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote
git branch -D $ONOSBranch # just incase there are local changes. This will normally result in a branch not found error
git clean -df # clean any local files
git fetch --all # update all caches from remotes
git reset --hard origin/$ONOSBranch # force local index to match remote branch
git clean -df # clean any local files
if [ -z "$ONOSTag" ] #if tag is not specified
then
git checkout $ONOSBranch #create new local branch
else
git checkout $ONOSTag #checkout the tag
fi
git branch
git log -1 --decorate
# Cherry pick the debugging patch for CHO
# git fetch ssh://you@gerrit.onosproject.org:29418/onos refs/changes/53/14953/1 && git cherry-pick FETCH_HEAD
echo -e "\n##### set jvm heap size to 8G #####"
echo ${ONOSJVMHeap}
inserted_line="export JAVA_OPTS="${ONOSJVMHeap}""
sed -i "s/bash/bash\n$inserted_line/" ~/onos/tools/package/bin/onos-service
echo "##### Check onos-service setting..... #####"
cat ~/onos/tools/package/bin/onos-service
export JAVA_HOME=/usr/local/java/jdk1.8.0_51
#Copy cell file over
cp ~/choTest3 ~/onos/tools/test/cells/