diff options
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py')
-rw-r--r-- | lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py b/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py deleted file mode 100644 index 4835faf7..00000000 --- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py +++ /dev/null @@ -1,116 +0,0 @@ -''' -Created on Aug 18, 2015 - -__author__ = "Elizabeth 'pidge' Flanagan" -__copyright__ = "Copyright 2012-2015, Intel Corp." -__credits__ = ["Elizabeth Flanagan"] -__license__ = "GPL" -__version__ = "2.0" -__maintainer__ = "Elizabeth Flanagan" -__email__ = "pidge@toganlabs.com" -''' - - -from buildbot.steps.shell import ShellCommand -from buildbot.status.results import SUCCESS, FAILURE -from twisted.python import log as tlog -import os, re - -from lib.buildsteps import BitbakeShellCommand - -class RunSDKSanityTests(BitbakeShellCommand): - - haltOnFailure = False - flunkOnFailure = True - name = "Running SDK Sanity Tests" - def __init__(self, factory, argdict=None, **kwargs): - self.factory = factory - self.testsfailed = 0 - self.testspassed = 0 - self.testsnoresult = 0 - self.namefailed = [] - self.namepassed = [] - self.namenoresult = [] - self.images="" - self.scene=None - self.suites=None - self.suitesappend=None - # the default of 4800 seconds is enough for running sanity tests in most cases - self.timeout = 14800 - for k, v in argdict.iteritems(): - setattr(self, k, v) - self.description = "Running SDK Sanity Tests" - kwargs['timeout']=self.timeout - super(RunSDKSanityTests, self).__init__(factory, argdict=None, **kwargs) - - def start(self): - layerversion = int(self.getProperty("layerversion_core", "0")) - command = "" - command = command + ". ./oe-init-build-env; " - command = command + "checkvnc; " - if layerversion >= 6: - command = command + "echo 'INHERIT += \"testimage\"' >> ./conf/auto.conf;" - command = command + "echo 'TEST_QEMUBOOT_TIMEOUT = \"1500\"' >> ./conf/auto.conf;" - if self.suites: - if layerversion > 3: - command = command + "echo 'TEST_SUITES = \"" + self.suites + "\"'" + " >> ./conf/auto.conf;" - else: - command = command + "echo 'TEST_SUITES = \"" + self.suites.replace('kernelmodule', '').replace('python', '') + "\"'" + " >> ./conf/auto.conf;" - if self.suitesappend: - command = command + "echo 'TEST_SUITES_append = \" " + self.suitesappend + "\"'" + " >> ./conf/auto.conf;" - command = command + "DISPLAY=:1 bitbake -v " + self.images + " -c testsdk" - else: - command = "echo 'Skipping step.'" - self.command = command - ShellCommand.start(self) - -###################################################################### -# -# -# Until we get better sanity reporting, I'm commenting this out. -# -# -###################################################################### - -# def describe(self, done=False): -# description = ShellCommand.describe(self,done) -# return description - -# def createSummary(self, log): -# log_text = log.getText() -# from StringIO import StringIO -# for line in StringIO(log_text): -# tlog.msg(line) -# if "NOTE:" in line: -# if "0 1 0" in line: -# self.testsfailed = self.testsfailed + 1 -# self.namefailed.append(line.replace("|","").replace(" ", "").replace("NOTE:", "").replace("0","").replace("1","").replace("\n","").replace("\t","")) -# elif "1 0 0" in line: -# self.testspassed = self.testspassed + 1 -# self.namepassed.append(line.replace("|","").replace(" ", "").replace("NOTE:", "").replace("0","").replace("1","").replace("\n","").replace("\t","")) -# elif "0 0 1" in line: -# self.testsnoresult = self.testsnoresult + 1 -# self.namenoresult.append(line.replace("|","").replace(" ", "").replace("NOTE:", "").replace("0","").replace("1","").replace("\n","").replace("\t","")) - -# def getText(self, cmd, results): -# text = self.describe(True)[:] -# text.append("---------") -# text.append("failed : " + str(self.testsfailed)) -# text.append("") -# if self.namefailed != []: -# for test in self.namefailed: -# text.append(test) -# text.append("---------") -# text.append("passed : " + str(self.testspassed)) -# text.append("") -# if self.namepassed != []: -# for test in self.namepassed: -# text.append(test) -# text.append("---------") -# text.append("noresult : " + str(self.testsnoresult)) -# text.append("") -# if self.namenoresult != []: -# for test in self.namenoresult: -# text.append(test) -# text.append("---------") -# return text |