[SDFAB-1022] Add linerate tests for meters in nightly job

Change-Id: I5a99070e819a25f6154670cda5090f7bd389b7a4
diff --git a/jjb/pipeline/fabric-tna-hardware.groovy b/jjb/pipeline/fabric-tna-hardware.groovy
index 9ef2de1..45ba7a2 100644
--- a/jjb/pipeline/fabric-tna-hardware.groovy
+++ b/jjb/pipeline/fabric-tna-hardware.groovy
@@ -44,17 +44,39 @@
                 }
             }
         }
-        stage('Run fabric-tna tests') {
+        stage("Build dependencies and fabric-tna") {
+            steps {
+                withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-internal-registry"]) {
+                    sh label: "Build dependencies and fabric-tna", script: """
+                        make deps
+                        make build-tester-img
+                        make ${params.PROFILE}
+                    """
+                }
+            }
+        }
+        stage("Run tests in hw mode") {
             steps {
                 script {
                     withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-internal-registry"]) {
-                        sh returnStdout: false, label: "Build fabric-tna and run linerate tests", script: """
+                        sh returnStdout: false, label: "Run tests in hw mode", script: """
                             PROFILE=${params.PROFILE} SWITCH_ADDR=${SWITCH_ADDR} bash .jenkins/linerate.sh
                         """
                     }
                 }
             }
         }
+        stage("Run tests in sw mode") {
+            steps {
+                script {
+                    withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-internal-registry"]) {
+                        sh returnStdout: false, label: "Run tests in sw mode", script: """
+                            PROFILE=${params.PROFILE} SWITCH_ADDR=${SWITCH_ADDR} TREX_PARAMS="--trex-sw-mode" PTF_FILTER="trex-sw-mode" bash .jenkins/linerate.sh
+                        """
+                    }
+                }
+            }
+        }
     }
     post {
         always {