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