buildbot: removed redundant "change is merged" check. 29/63729/1
authorTomasz Olszak <t.olszak@samsung.com>
Fri, 25 Mar 2016 10:29:55 +0000 (11:29 +0100)
committerTomasz Olszak <t.olszak@samsung.com>
Fri, 25 Mar 2016 10:29:55 +0000 (11:29 +0100)
Change-Id: Ib44c8646869e74c7649204b178b792b1337701e3

tool/development/buildbot/nativesamples.py

index 96f9891..6390e7f 100644 (file)
@@ -504,23 +504,20 @@ class NativeSamples:
                        if changeInfo is None:
                                changeInfo = self.gerrit.getChangeInfo(nativeSampleChange)
 
-                       if changeInfo['status'] != "MERGED" and changeInfo['status'] != "ABANDONED":
-                                       os.chdir(nativeSampleChange.nativeSample.projectPath)
-                                       self._cleanRepoAndCheckoutToRevision(sampleChange = nativeSampleChange)
-                                       sourceType = self._currentSourceType()
-                                       if sourceType == self.SourceTypeTpkProject:
-                                               tempTccOutputDir = tempfile.mkdtemp()
-                                               self.invokeConvert(revision = nativeSampleChange.revisionId, outputDirectory = tempTccOutputDir)
-                                               os.chdir(tempTccOutputDir)
-                                       elif sourceType != self.SourceTypeSampleProject:
-                                               raise ValueError("Wrong source type to use tcc tool")
-                                       result, tccOutput = self.invokeTcc()
-                                       print tccOutput
-                                       if not result:
-                                               print 'FAIL: tcc for ', nativeSampleChange.nativeSample.projectName, ' and changeId:', nativeSampleChange.changeId
-                                               return False, tccOutput
-                       else:
-                               print "change already " + changeInfo['status']
+                       os.chdir(nativeSampleChange.nativeSample.projectPath)
+                       self._cleanRepoAndCheckoutToRevision(sampleChange = nativeSampleChange)
+                       sourceType = self._currentSourceType()
+                       if sourceType == self.SourceTypeTpkProject:
+                               tempTccOutputDir = tempfile.mkdtemp()
+                               self.invokeConvert(revision = nativeSampleChange.revisionId, outputDirectory = tempTccOutputDir)
+                               os.chdir(tempTccOutputDir)
+                       elif sourceType != self.SourceTypeSampleProject:
+                               raise ValueError("Wrong source type to use tcc tool")
+                       result, tccOutput = self.invokeTcc()
+                       print tccOutput
+                       if not result:
+                               print 'FAIL: tcc for ', nativeSampleChange.nativeSample.projectName, ' and changeId:', nativeSampleChange.changeId
+                               return False, tccOutput
                finally:
                        self._cleanRepoAndCheckoutToRevision(sampleChange = nativeSampleChange)
                        os.chdir(curDir)
@@ -604,19 +601,16 @@ class NativeSamples:
                        if changeInfo is None:
                                changeInfo = self.gerrit.getChangeInfo(nativeSampleChange)
 
-                       if changeInfo['status'] != "MERGED" and changeInfo['status'] != "ABANDONED":
-                               os.chdir(nativeSampleChange.nativeSample.projectPath)
-                               self._cleanRepoAndCheckoutToRevision(sampleChange = nativeSampleChange)
-                               res, output = self.invokeCheckpatchTizen()
-                               if res:
-                                       print output
-                                       print "SUCCESS: sources checked with checkpatch_tizen.pl for " + nativeSampleChange.changeId + " from project " + nativeSampleChange.nativeSample.projectName
-                               else:
-                                       print "ERROR:", output
-                                       print "FAIL: sources checked failed with checkpatch_tizen.pl for " + nativeSampleChange.changeId + " from project " + nativeSampleChange.nativeSample.projectName
-                                       return False, output
+                       os.chdir(nativeSampleChange.nativeSample.projectPath)
+                       self._cleanRepoAndCheckoutToRevision(sampleChange = nativeSampleChange)
+                       res, output = self.invokeCheckpatchTizen()
+                       if res:
+                               print output
+                               print "SUCCESS: sources checked with checkpatch_tizen.pl for " + nativeSampleChange.changeId + " from project " + nativeSampleChange.nativeSample.projectName
                        else:
-                               print "change already " + changeInfo['status']
+                               print "ERROR:", output
+                               print "FAIL: sources checked failed with checkpatch_tizen.pl for " + nativeSampleChange.changeId + " from project " + nativeSampleChange.nativeSample.projectName
+                               return False, output
                finally:
                        os.chdir(curDir)
                return True, ""