blob: 7c0e11f418505629d4cf6be81fd3016273c5de27 [file] [log] [blame]
Devin Lim18f459d2018-01-26 19:20:30 -08001#!/bin/bash
2echo -e "\n##### Set TestON Branch #####"
3echo "TestON Branch is set on: $TestONBranch"
4
5cd ~/OnosSystemTest/
6git checkout HEAD~1 # Make sure you aren't pn a branch
7git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote
8git branch -D $TestONBranch # just incase there are local changes. This will normally result in a branch not found error
9git clean -df # clean any local files
10git fetch --all # update all caches from remotes
11git reset --hard origin/$TestONBranch # force local index to match remote branch
12git clean -df # clean any local files
13git checkout $TestONBranch #create new local branch
14git branch
15git log -1 --decorate
16# Cherry pick the debugging patch for CHO
17git fetch ssh://you@gerrit.onosproject.org:29418/OnosSystemTest refs/changes/51/14951/5 && git cherry-pick FETCH_HEAD
18
19echo -e "\n##### Set ONOS Branch #####"
20echo "ONOS Branch is set on: $ONOSBranch"
21
22echo -e "\n##### set a branch param for downstream project to use #####"
23echo $ONOSBranch > /tmp/branchToTest #set a param for downstream project to use
24#cat /tmp/branchToTest
25
26cd ~/onos
27git checkout HEAD~1 # Make sure you aren't pn a branch
28git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote
29git branch -D $ONOSBranch # just incase there are local changes. This will normally result in a branch not found error
30git clean -df # clean any local files
31git fetch --all # update all caches from remotes
32git reset --hard origin/$ONOSBranch # force local index to match remote branch
33git clean -df # clean any local files
34if [ -z "$ONOSTag" ] #if tag is not specified
35then
36 git checkout $ONOSBranch #create new local branch
37else
38 git checkout $ONOSTag #checkout the tag
39fi
40git branch
41git log -1 --decorate
42# Cherry pick the debugging patch for CHO
43# git fetch ssh://you@gerrit.onosproject.org:29418/onos refs/changes/53/14953/1 && git cherry-pick FETCH_HEAD
44
45
46echo -e "\n##### set jvm heap size to 8G #####"
47echo ${ONOSJVMHeap}
48
49inserted_line="export JAVA_OPTS="${ONOSJVMHeap}""
50sed -i "s/bash/bash\n$inserted_line/" ~/onos/tools/package/bin/onos-service
51
52echo "##### Check onos-service setting..... #####"
53cat ~/onos/tools/package/bin/onos-service
54
55export JAVA_HOME=/usr/local/java/jdk1.8.0_51
56
57#Copy cell file over
58cp ~/choTest3 ~/onos/tools/test/cells/