--- /dev/null
+#!/usr/bin/python
+
+import sys, os
+import subprocess
+import traceback
+import nativesamples as ns
+
+reload(sys)
+sys.setdefaultencoding('utf8')
+
+if ns.numberOfProcesses(".*python.*" + os.path.basename(__file__)) > 1:
+ print "process already running"
+ sys.exit(0)
+
+if len(sys.argv) < 2:
+ print "Please provide samples root build path"
+ sys.exit(0)
+
+rootBuildDir = os.path.abspath(sys.argv[1])
+
+nativeSamples = ns.NativeSamples(rootBuildDir)
+
+try:
+ nativeSamples.checkAndSendEmailIfUpdateIsAvailable()
+except:
+ subject = 'Tizen SAMPLE DAILY BUILD TEST error: Something unexpected happened during daily build check'
+ stacktrace = "Exception Info:\n\n" + traceback.format_exc()
+ traceback.print_exc()
+ nativeSamples.emailSender.send(mailSubject = subject, mailText = stacktrace)
print "Evaluating next project"
htmlText += "</TABLE></HTML>"
self.emailSender.send(mailSubject = 'DAILY REGRESSION TESTS SUMMARY (' + str(datetime.date.today())+")", mailText = htmlText, mimeType='html')
+ def checkAndSendEmailIfUpdateIsAvailable(self):
+ os.chdir(self.config.sampleCoreComponentsPath)
+ subprocess.call(["git", "fetch", "origin"])
+ output = subprocess.check_output(["git", "branch", "--contains", "origin/master"], stderr = subprocess.STDOUT)
+ reRes = re.search("^\*", output)
+ if reRes is None:
+ self.emailSender.send(mailSubject = "BUILDBOT UPDATE AVAILABLE", mailText = "Seems like update for sample-core-components is available. origin/master is not pulled to local repository")