Update git pull to be a params variable
diff --git a/TestON/tests/ProdFunc/ProdFunc.params b/TestON/tests/ProdFunc/ProdFunc.params
index 5f1ec30..c8e125b 100755
--- a/TestON/tests/ProdFunc/ProdFunc.params
+++ b/TestON/tests/ProdFunc/ProdFunc.params
@@ -5,7 +5,9 @@
<ENV>
<cellName>driver_test</cellName>
</ENV>
-
+ <GIT>
+ <pull>True</pull>
+ </GIT>
<CTRL>
<ip1>10.128.20.11</ip1>
<port1>6633</port1>
diff --git a/TestON/tests/ProdFunc/ProdFunc.py b/TestON/tests/ProdFunc/ProdFunc.py
index 9c2c271..adbdb24 100644
--- a/TestON/tests/ProdFunc/ProdFunc.py
+++ b/TestON/tests/ProdFunc/ProdFunc.py
@@ -31,6 +31,7 @@
"""
cellName = main.params[ 'ENV' ][ 'cellName' ]
ONOS1Ip = main.params[ 'CTRL' ][ 'ip1' ]
+ gitPull = main.params[ 'GIT' ][ 'pull' ]
main.case( "Setting up test environment" )
main.log.report(
@@ -43,22 +44,23 @@
main.step( "Git checkout and get version" )
main.ONOSbench.gitCheckout( "master" )
- gitPullResult = main.ONOSbench.gitPull()
- main.log.info( "git_pull_result = " + str( gitPullResult ))
+ if gitPull == 'True':
+ gitPullResult = main.ONOSbench.gitPull()
+ if gitPullResult == 1:
+ main.step( "Using mvn clean & install" )
+ main.ONOSbench.cleanInstall()
+ main.step( "Creating ONOS package" )
+ packageResult = main.ONOSbench.onosPackage()
+ elif gitPullResult == 0:
+ main.log.report(
+ "Git Pull Failed, look into logs for detailed reason" )
+ main.cleanup()
+ main.exit()
+ main.log.info( "git_pull_result = " + str( gitPullResult ))
+ else:
+ main.log.info( "Skipping git pull" )
main.ONOSbench.getVersion( report=True )
-
packageResult = main.TRUE
- if gitPullResult == 1:
- main.step( "Using mvn clean & install" )
- main.ONOSbench.cleanInstall()
- main.step( "Creating ONOS package" )
- packageResult = main.ONOSbench.onosPackage()
- elif gitPullResult == 0:
- main.log.report(
- "Git Pull Failed, look into logs for detailed reason" )
- main.cleanup()
- main.exit()
-
main.step( "Uninstalling ONOS package" )
onosInstallResult = main.ONOSbench.onosUninstall( ONOS1Ip )