Remove old database files before starting new SCPF tests

Change-Id: I652ca1f28ffb0d345f329de9b4e609926c2e0e1c
diff --git a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
index ef20820..c205778 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
@@ -389,6 +389,10 @@
                                    'WikiPrefix=' + prop[ "WikiPrefix" ],
                                    'WORKSPACE=' + workSpace ] ) {
                             if ( !graphOnly ){
+                                if ( isSCPF ){
+                                    // Remove the old database file
+                                    sh SCPFfunc.cleanupDatabaseFile( testName )
+                                }
                                 sh initAndRunTest( testName, testCategory )
                                 // For the Wiki page
                                 sh cleanAndCopyFiles( pureTestName )
diff --git a/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy b/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy
index 2c86f43..1623373 100644
--- a/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy
@@ -339,6 +339,11 @@
            "','\$BUILD_NUMBER', '\$ONOSBranch', " + affectedByOldFlow( isOldFlow, testName ) + "\$line);\""
 }
 
+def cleanupDatabaseFile( testName ){
+    // clean up the database file created under /tmp
+    return 'rm /tmp/' + SCPF[ testName ][ 'file' ]
+}
+
 def databasePart( testName, database_command ){
     // read the file from the machine and insert it to the database