aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py')
-rw-r--r--lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py139
1 files changed, 0 insertions, 139 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py b/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
deleted file mode 100644
index c52672e9..00000000
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
+++ /dev/null
@@ -1,139 +0,0 @@
-'''
-Created on Jan 10, 2013
-
-__author__ = "Elizabeth 'pidge' Flanagan"
-__copyright__ = "Copyright 2012-2013, 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 RunSanityTests(BitbakeShellCommand):
-
- haltOnFailure = False
- flunkOnFailure = True
- name = "Running 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 Sanity Tests"
- kwargs['timeout']=self.timeout
- super(RunSanityTests, self).__init__(factory, argdict=None, **kwargs)
-
- def start(self):
- localconf = self.getProperty("LOCALCONF")
- layerversion = int(self.getProperty("layerversion_core", "0"))
- distro = self.getProperty("DISTRO")
- self.command = ""
- self.command = self.command + ". ./oe-init-build-env; "
- self.command = self.command + "checkvnc; "
- if distro == "poky-lsb" and layerversion < 6:
- self.skipStep('Skipping step.')
- elif layerversion < 9 and 'musl' in localconf:
- self.skipStep('Skipping step for musl.')
- # Releases older than Rocko didn't build core-image-sato-sdk
- # with musl.
- elif layerversion < 11 and 'musl' in localconf:
- self.images = self.images.replace("core-image-sato-sdk", "core-image-sato")
- elif layerversion < 8 \
- and 'DISTRO_FEATURES_remove="x11"' in localconf.replace(" ", ""):
- self.skipStep('Skipping step for no-x11.')
- elif layerversion > 1:
- self.command = self.command + "echo 'INHERIT += \"testimage\"' >> ./conf/auto.conf;"
- self.command = self.command + "echo 'TEST_QEMUBOOT_TIMEOUT = \"1500\"' >> ./conf/auto.conf;"
-
- target_ip = self.getProperty('target_ip')
- server_ip = self.getProperty('server_ip')
- if target_ip and server_ip:
- self.command = self.command + "echo 'TEST_TARGET=\"simpleremote\"' >> ./conf/auto.conf;"
- self.command = self.command + "echo 'TEST_TARGET_IP=\"%s\"' >> ./conf/auto.conf;" % target_ip
- self.command = self.command + "echo 'TEST_SERVER_IP=\"%s\"' >> ./conf/auto.conf;" % server_ip
-
- if self.suites:
- if layerversion > 3:
- self.command = self.command + "echo 'TEST_SUITES = \"" + self.suites + "\"'" + " >> ./conf/auto.conf;"
- else:
- self.command = self.command + "echo 'TEST_SUITES = \"" + self.suites.replace('kernelmodule', '').replace('python', '') + "\"'" + " >> ./conf/auto.conf;"
- if self.suitesappend:
- self.command = self.command + "echo 'TEST_SUITES_append = \" " + self.suitesappend + "\"'" + " >> ./conf/auto.conf;"
- self.command = self.command + "DISPLAY=:1 bitbake -v " + self.images + " -c testimage"
- else:
- self.command = self.command + "echo 'IMAGETEST = \"qemu\"' >> ./conf/auto.conf;"
- if self.scene:
- self.command = self.command + "echo 'TEST_SCEN = \"" + self.scene + "\"'" + " >> ./conf/auto.conf;"
- self.command = self.command + "DISPLAY=localhost:1 bitbake -v " + self.images + " -c qemuimagetest_standalone"
- 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