[ONOS-7676] Enable support for fabric.p4 in SegmentRouting ONOS System Tests

Change-Id: I3dde8fe5d90d2c595021ff05ab45ccb37bbfbef6
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index f7b9d2e..313d9b6 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -59,7 +59,12 @@
             main.useCommonTopo = main.params[ 'DEPENDENCY' ][ 'useCommonTopo' ] == 'True'
             main.topoPath = main.path + ( "/.." if main.useCommonTopo else "" ) + "/dependencies/"
             main.useCommonConf = main.params[ 'DEPENDENCY' ][ 'useCommonConf' ] == 'True'
+            if main.params[ 'DEPENDENCY' ].get( 'useBmv2' ):
+                main.useBmv2 = main.params[ 'DEPENDENCY' ][ 'useBmv2' ] == 'True'
+            else:
+                main.useBmv2 = False
             main.configPath = main.path + ( "/.." if main.useCommonConf else "" ) + "/dependencies/"
+            main.bmv2Path = main.path + "/../dependencies/"
             main.forJson = "json/"
             main.forChart = "chart/"
             main.forConfig = "conf/"
@@ -70,6 +75,7 @@
             main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
             main.topologyLib = main.params[ 'DEPENDENCY' ][ 'lib' ] if 'lib' in main.params[ 'DEPENDENCY' ] else None
             main.topologyConf = main.params[ 'DEPENDENCY' ][ 'conf' ] if 'conf' in main.params[ 'DEPENDENCY' ] else None
+            main.bmv2 = "bmv2.py"
             main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," )
             main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
 
@@ -200,6 +206,10 @@
                                                                 main.configPath + main.forConfig + conf,
                                                                 "~/",
                                                                 direction="to" )
+        copyResult = copyResult and main.ONOSbench.scp( main.Mininet1,
+                                                        main.bmv2Path + main.bmv2,
+                                                        main.Mininet1.home + "custom",
+                                                        direction="to" )
         stepResult = copyResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,